Similarly to the rewrite of UnusedVariableRemover from d230392, it now
analyzes the entire stage before inlining anything. This approach is
more robust and easier to debug.
The inliner can now inline into the right side of an assignment even if
the left side references the same variable.