Fixed some tricky edge cases for ->wp_check_wp_context_matches()