Pattern/expression ambiguity resolution