Fixed bug where implicit semicolon insertion was messing up returns.

Rebased with:
Fixed indentation for #2052 fix
Added new line at end of file to ticket2052 unit test
Merge pull request #65 from callumacrae/ticket/2052

Fixed bug where implicit semicolon insertion was messing up returns.