I've finally managed to reproduce the error.
For some reason, on all systems (> 5) I have used to test my package, checking of the array bounds was turned off. It can be switched on by options(CBoundsCheck = TRUE)
or via an environment variable R_C_BOUNDS_CHECK=yes
.