Bugfix for ranged input loop bounds.