The error is triggered on
scene.activeCamera.rotationQuaternion *= pendingDeviceQuat;
Being scene already defined and pendingDeviceQuat a valid quaternion.
Fully reproducible sample here (thanks for the playground!) https://www.babylonjs-playground.com/#UF6PT9#15
Thank you in advance.
scene.activeCamera.rotationQuaternion.multiplyToRef to perform the multiply.
Thank you the weird part is that I multiplied other Quats in the same code without problems!