I think if you gain the card they buy, then they Lose Track and gain nothing.
Not true, actually. Talisman uses the same mechanism.
Doesn't Seagull Mine say that you specifically gain a card from the pile *before* the other player does?
Then again, Talisman says "when you buy a card costing less than X", and I don't know if there's a window after buying but before you gain where Talisman steps in. Now I'm starting to have all kinds of doubts about whether Talisman should even work.
Yeah when you really think about it Talisman's kind of weird, since when-buy effects take place before when-gain.
—I buy a Sir Martin.
—Oh cool, when I buy a card I gain a free copy of it! Now I gain Sir Martin for free!
—Okay, done resolving when-buy effects, now I gain the card I bought.
—Aw, no Sir Martin is available in the supply. How sad! Guess my buy went to waste.