Thanks for your comments. Starting point for these investigations was
[https://github.com/StefanSalewski/nim-chess4/blob/master/engine.nim#L522](https://github.com/StefanSalewski/nim-chess4/blob/master/engine.nim#L522) it.df.abs == BishopID or it.df.abs == QueenID I was thinking of avoiding the abs() -- and then discovered the strange behaviour of above loops.
