To be fair, I bought a Z with a gearbox problem, though I didn't realise it until the drive home.
The dealer replaced the box and the car is sweet, was a shame to write it off over the box as it's a real minter.
If you can factor in the cost of a box, to the purchase price, and you're getting an exceptionally good deal. I'd go for it. As long as that's all that's wrong with it.
It was a real chore finding a good box for mine though.