GROOVY-7230: Fix NPE in constant initialization optimizer