Fixes issue #1056

Moves the code that fixes the "timeblock" field name to before the
field names are used so that it actually works.
Merge branch 'lua-issue-1056' into mit-prod