GRAILS-11116 Custom marshaller registrar bean does not work - new fix

I've cleaned up PR, so it contains only changes needed to fixes an issue https://jira.grails.org/browse/GRAILS-11116