skofnung, whether or not it was purchased by T-Bird under seemingly legitmate legal conditions is not the point. If the gun was part of a crime (felon in possession), then it can be taken into evidence. Additionally, the felon could not have legally sold it to the dealer as legally he could not be in possession of it or own it.
I am guessing that the dealer wasn't 100% in the loop. I can't imagine the police releasing the gun for sale and then demanding it back. If it was released, then my guess is that your dealer should have that receipt, but he probably just dealt with them on the phone and so doesn't have a receipt. Of course if it never went to the police, then there would be no receipt. As with any government agency, there may be more than one person involved and the folks there may not all be on the same plan as to how to proceed. In other words, the police may have initially said it was okay to sell, and then later were informed (as by the DA) or determined that the actual gun was needed, not just documentation.
Your dealer should take it back because he sold it to you under the misconception that he had free and clear title to possess it, and he did not. Chances are, he thought he did and for whatever reason, things changed. Besides, you are a good customer with a history (now, if not previously) of repeat business!
Try the dealer first. After all, he sold you a gun that was used in a crime. He seems to be cooperating with the police and my guess is that he will take it back again. It really might be in his best interest with the police, ATF, and with you. While he may not have intentionally done anything wrong, he did buy a gun from a felon. I am sure he would like to appear to be operating in good faith with all the folks involved.
T-Bird, if your dealer does not buy it back and the police demand possession (either by politely asking or a warrant), document everything fully before you surrender the gun, during the transaction, and most definitely get a receipt if they do not provide you with a warrant. If you are served a warrant, verfity the data on the warrant is accurate with the gun.
Also, determine if you can, what the process is for regaining ownership of the gun, if possible. As with dealing with your dealer, the police may be perfectly happy with releasing the gun back to you once it is no longer needed. Of course, that may take years between the current investigation, trial, and possible appeal.
Try the dealer first. If that doesn't work, contact ATF concerning the surrender of your gun to the local police. Explain the situation with all the appropriate information (police agency, investigator, case #, etc.) and ask if you have recourse on the dealer. Here, the ATF may be a decent source of reliable information that will be free. You can consult a lawyer or NRA pertaining to such matters.
You can ask your local police, but since they are involved in the investigation, I would not be inclined to necessarily believe they are fluent with all the relevant and specific gun laws. If you think about it, they aren't exactly behaving with a clear course of progression or understanding of their needs. Try as they might, no cop knows everything and their realm is quite expansive. Here, my thought is that they may say that you will get the gun back when you can't, unbeknownst to the police, or say you can't when you can, also unbeknownst to them.