Various fixes for the creation of forms and templates from Page Schemas

Change-Id: I665afc0c7655feb6aab6655680a9acdb3a0ded18