Fix yet more castling issues.