GROOVY-10271, GROOVY-10272: STC: process closure in ternary expression