GRAILS-10917 Fix for returning the correct model when a domain with errors is returned to an HTML renderer