GROOVY-7134: Add compatibility with runtime traits