Copter-4.0.5 released!

I replied in another discussion regarding your tuning issues.
If you want to use EKF3 then update firmware to 4.1 where it is tested and stable, otherwise read the doco on enabling EKF3 in earlier versions. Any particular reason you are worried about IMU_MASK ?