Include hidden if it is hidden from nav

And fix an SQL crash if not includeHidden