That looks to be a bug. I actually accidently recreated it in Java a month ago on a homework assignment, so I expect it was a similar mistake in the game. (well not exactly the same, but the same idea)