To the OP, you've done nothing wrong here, but if you're inclined to "help" the dealer out, here's what I would propose.
Tell the dealer he can buy it back from you for the cost to replace, plus any shipping costs, transfer, etc. OR find one on Gunbroker and have the dealer purchase it. Once it has been delivered to the dealer, have him transfer it to you. Then and only then, would I give him the original gun back. I wouldn't give him anything until a replacement was in my possession. This way, you're not out a gun or any cash and any additional cost is paid by the dealer.
Tell the dealer he can buy it back from you for the cost to replace, plus any shipping costs, transfer, etc. OR find one on Gunbroker and have the dealer purchase it. Once it has been delivered to the dealer, have him transfer it to you. Then and only then, would I give him the original gun back. I wouldn't give him anything until a replacement was in my possession. This way, you're not out a gun or any cash and any additional cost is paid by the dealer.