TMDM-7693 : Changing elements' order in complex type in custom layout doesn't infect web ui

TMDM-7693 : Revert old code