ui:composition with template behaving strangely