His intention was to take possession of the firearm after paying the cost of the firearm from his own pocket.
He therefore meets the criteria of the law.
It doesn't matter when he decided that he intended to turn the firearm over to the police, the fact is that he purchased a firearm with his own money, intending to take possession of the firearm for himself. IOW, he was the "actual buyer" of the firearm as required by law.
This was never a straw purchase.
Let him argue it before a court. How many ‘straw’ purchasers have made the same argument?
..also, the gun dealer came to pretty much the same conclusion when they refused to transfer the firearm to Kelly. They believed he was dishonest in his intentions regarding the purchase.