Handle groovy metaclasses