Compass influence in Stabilize mode

Hello. Recently I was trying to fly my new copter and almost crashed it because it lost horizon level and started to drift very quickly.
I used that earlier only accel and gyro were used for attitude calculations so I ignored big compass offsets during calibration (I just wanted to fly in Stabilize). However in my log it appears that exactly compass caused horizon level lost (NKF4.SM grown very high at the same time when EKF2 failed). It is written in EKF article in Ardupilot wiki that EKF2 is more complex than DCM and it uses all sensors.
So here’s the question:
Does a compass has direct influence on attitude calculation and can cause horizon level lost?