Merge branch 'hotfix/#6949-form-factory-undefined-hydrator'

Close #6949
little code improvements and performance improvements
Merge branch 'cs/#6953-code-quality-improvements' into develop

Close #6953
Forward port #6953