Valve has announced a small change to how Steam Gifts work that should stop trading partners being shafted.
From now on, if you buy a game as a Gift and keep it in your inventory, you won't be able to trade it for 30 days.
You can still pass the Gift to a user as normal; the restriction only applies to trading.
According to the Steam Community post announcing the change, the rule change should prevent users accepting gifts as trade, then losing them when the original purchaser cancels the transaction.
"We've made this change to make trading gifts a better experience for those receiving the gifts. We're hoping this lowers the number of people who trade for a game only to have the game revoked later due to issues with the purchaser's payment method," Valve said.
Only very unscrupulous individuals would do such a thing on purpose, of course; I'm sure there are loads of people who have purchased gifts and then had the transaction cancelled for legitimate reasons, like a credit card expiring. In any case, this should help ease the problem at least a little.