Better occurrrence analysis with casts
When poking around in GHC I became aware that occurrence analysis gives poor results with
\x -> ((\y -> \z -> ...x...) |> co)
(where the lambdas are interrupted by a cast in the middle). The 'x' gets a "inside-lam" tag, even though it's morally part of the same lambda-group as y and z. The occurrence analyser goes to some trouble to treat lambdas as a group for this reason, otherwise we lose a lot of used-once info, which in turn triggers more iterations of the Simplifier.
Mostly this doesn't matter, because the Simplifier pushes the casts out of hte way. But not always. (The proximate situation was working on #19790 (closed), !6222 (closed), where I had a stable unfolding with such a structure.)
Anyway it seems prettty easy to fix; hence this ticket.