Fix harmless loop off-by-ones found by Moonlightning