WIP: Let the specialiser work on dicts under lambdas
Following the discussion under #16473 (closed), this change allows the specializer to work on any dicts in a lambda, not just those that occur at the beginning. This plays much more nicely for higher-rank continuations that pack dicts.