Possible solution for GRAILS-10454 

Changed the way of getting real class of hibernate proxied object.

New pull request against 2.2.x branch as discussed at https://github.com/grails/grails-core/pull/397#issuecomment-24650910