Apply SSA transform on ASTs before caching on liverunner

1. Fix constructor ast copying
2. Fix broken testcases