Bug fix from latest getTargetSGPLevel commits