Issue #2421321 by DamienMcKenna: Fixed logic that resulted in access-denied errors when loading settings pages.