SSA preparation part 2

Some more changes from my SSA branch. The Reflect.compare change on the C++ target was made to avoid some weird Int type inference which comes from both `>` and `cast` being used.