GROOVY-6094: Alternate fix that doesn't break external APIs