Partially revert 37b8d549d610c

That patch introduced a bug where the list of dynamic fields for a form is always empty

Fixes #979