I think you're running into an obscure bug in my 6502 emulator. More specifically: When executing code across PRG banks, the bank numbers must be contiguous.
For example, crossing from 8000 to A000 will glitch because you're going from bank 1E to 1C. OTOH, going from A000->C000 will work ok because you're using banks 1C->1D.