Improved globalpagepermission query.