GROOVY-6670: Reorder searches for class nodes in closure signature hint