This is usually a classic case of dirty/temperamental CEM contacts, it's very common on the earlier pre face lift cars but 2008+ had gold plated contacts in the loom which was supposed to fix this problem.
As suggested above, I'd start with cleaning the contacts. Disconnect the battery, unplug every connector going to the CEM (take a picture before so you remember where each go) and clean up both the connectors and sockets with an old toothbrush and some contact cleaner.
https://www.youtube.com/watch?v=H_M0KW3wFpI