Answering on someone else's behalf - before an RA is issued, the TCAS units agree amongst themselves who will go up and who will go down. They will also agree to change their "collective" minds if insufficient action has been taken by either party. And you are right, the obvious error is duff altitude encoding. Hopefully this is checked (apart from engineering checks) when you cross-check your altimeters (we've normally got three) and whenever you check in with ATC.
Hope this helps.
PM