See this analysis board: https://lichess.org/analysis/chess960/4rrk1/pbbp2p1/1ppnp3/3n1pqp/3N1PQP/1PPNP3/PBBP2P1/4RRK1_w_Ff_-_10_18#34
The PGN for this position is:
[Variant "Chess960"]
[FEN "bbnqnrkr/pppppppp/8/8/8/8/PPPPPPPP/BBNQNRKR w KQkq - 0 1"]
1. b3 b6 2. Bb2 Bb7 3. c3 c6 4. Bc2 Bc7
5. Ncd3 Ncd6 6. Nf3 e6 7. e3 Qe7 8. Qe2 Nf6
9. Nd4 Nd5 10. f4 f5 11. Qg4 Qg5 12. h4 h5
13. Rh3 Rh6 14. Rhf3 Rhf6 15. R3f2 R6f7 16. Re2 Re7
17. Ree1 Ree8
You can see that you are able to play the move 18. O-O-O but this should not be possible because there is a rook on e1, and all squares between the king's initial and final squares must be vacant when castling. On the other hand, when there is any other type of piece (i.e. knight, bishop or queen) on e1, you are correctly unable to castle.
Wow, a move generation bug! Thanks for reporting.
Most helpful comment
Wow, a move generation bug! Thanks for reporting.