Fix bug where castling perms were reappearing.

Closes #32.