Use an intermediate representation to reinterpret the value in Target::paintAsType
Merge pull request #3726 from ibuclaw/paintnounion

Use an intermediate representation to reinterpret the value in Target::paintAsType
[Refactoring] Reduce uninitialize local variables
[Refactoring] Reduce indent level in loops
[Refactoring] Remove unnecessary SCOPEfree flag handling

It's properly handled in `Scope::alloc`.