Fix multiple block related issues

* Method calls with blocks in controllers were not being processed correctly (see #406)
* Assignments to instance variables inside blocks were treated like local assignments
* Local assignments inside blocks to variables outside block were lost

All of these were made even more annoying by having to handle them inside `if` expression branches.