[mcs] Reachability and flow analysis rewrite to work on resolved statements and expressions