Remove dead, untested and unreachable code in FormHelper.

Closes #3650