Fixes bug with Nested Block instances

Nested block instances were not being transformed correctly.