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

Now also for 2.3.x