Couple of fixes related to SSA and linearization