Removed possibility of home pagination redirect loop.

When the posts database was empty, navigating to the home page would
result in a redirect loop due to a bug. This bug has now been fixed.