Fixes a rouge closing li under certain conditions

This pull fixes a rouge closing LI in the list nav when the query is upcoming but there is no previous post link and no past events.