fix for GRAILS-8572 "Rendering a Command Object as JSON causes ArrayIndexOutOfBoundException"