Checks for enabled legal page (Fixes #3164)

Simple check for legal pages, improves performance. Fixes http://bugs.locamotion.org/show_bug.cgi?id=3164