Fixed sorting of fields inside a content-type.

It is now equivalent to the one seen in "Content Model" in the web interface.