Fixes for FilePRG and nested form elements + various cleanup
Merge branch 'hotfix/3557' into develop

Close #3557