Avoid issues when editing Ktemplate when XML is malformed

See : http://www.kunena.org/forum/k-3-0-installation-and-upgrade/128682-fatal-error-call-to-a-member-function-getfieldset-on-a-non-object-in-components-com-kunena-template-joomla30-templates-edit-php-on-line-70