GROOVY-6794: Fix dynamic property access in static compiler