Simplify tricky logical expression in associative method lookup.