Properly named variable inside block

Closes #9824.
Removed unnecessary block