smugmug/yui-gallery — pull request #24 by frio (2013-06-25 02:22:18+00:00)
Title: Prevents circular wrapping when configured to do so and using .previous()

This looks like it was just an oversight -- the comment (and API!) indicates that this check should already exist.