The source of the altitude capture/preset data could be an encoding altimeter, or some other source e.g. a stand alone altitude encoder which might also be feeding a Mode C transponder.
You can get your Mode C XP checked by ATC next time you fly - ask them what you are returning. Unless it is one of the modern ones e.g. a KT76C which shows the actual returned flight level on the front panel.
It is not unusual for one of the dozen or so gray code wires to have a bad connection, which manifests itself as all kinds of weird things...