Block Binding: hoist function declaration in block to beginning of block

Closes #1304