You were right, and thanks for reporting it. It wasn't bad luck.
A merchant will only buy so many gems in one visit: your level squared, plus one (101 at level 10, 3,970 at level 63). The Sell Gems question didn't say so. It offered every gem you carried, then if you asked for more than the limit the merchant took all of them and teleported you. That old rule hardly mattered when gems were rare, but the family vault hands an heir thousands at once. The logs show you lost 271, 4,345 and 5,383 gems that way today.
It's fixed in 5.4.55.1: the question now shows the real most the merchant will buy, and asking for more just gets a no. Nothing is taken and you stay where you are. An heir spending vault gold at a low level is also no longer called a thief.
The 10,000 gems you lost are back in your House vault. Until 5.4.55.1 is live, sell no more than your level squared plus one at a time (or use the Gem-cutter), or the old rule will take them again. I'll post here when it's live.