Fix ID check in admin_page_ordering view to prevent some redundant queries.