Fix the ownership of `Legality` member variable of BottomUpVec. It should get created in runOnFunction() and get destroyed when the function returns.
Fix the ownership of `Legality` member variable of BottomUpVec. It should get created in runOnFunction() and get destroyed when the function returns.