Gyroscope data is available but failes to compile

I'm trying to get accelerometer data and gyroscope data like so:

var options = {:period => 1, :accelerometer => {:enabled => true, :sampleRate => maxSampleRate}, :gyroscope => {:enabled => true, :sampleRate => maxSampleRate}};
Sensor.registerSensorDataListener(method(:accelCallback), options);

 public function accelCallback(sensorData as SensorData) as Void {
        var accelData = sensorData.accelerometerData;
        var gyroData = sensorData.gyroscopeData;
}
This doesn't want to compile, generating this error:
Garmin\ConnectIQ\Sdks\connectiq-sdk-win-4.1.7-2022-11-21-562b8a195\samples\PitchCounter\source\PitchCounterProcess.mc:76,8: Undefined symbol ':gyroscopeData' detected.
If I than just comment the line out that generates the error, it compiles and runtime I can see in the debugger that the gyroscopeData is available as can be seen below. 

So how is it possible that using sensorData.gyroscopeData fails to compile with sdk 4.1.7 but is runtime available? Any ideas on how to get this compiled or somehow bypass these compiler checks?
Also the documentation is quite confusing:
https://developer.garmin.com/connect-iq/core-topics/sensors/ <- here it clearly indicates that gyroscopeData is available per 3.3.0