Fix for GROOVY-6042: Do not assume that keys are strings