fix for GRAILS-10975: throw primary LinkageError instead of secondary ClassNotFoundException