VIRB 360 compass unstable

Since recently in my VIRB 360 footage the compass data is broken. Compass lock stabilisation doesn't really lock it, the view rotates from time to time. Follow Path stabilisation often starts looking sideways, but then during the video rotates, sometimes looking forward and sometimes backward. GPS data looks fine so far as I can tell, and accelerometer also looks good, because Stabilize Only stabilisation works perfectly.