Consulting an attorney is a good idea.
As I understand it, Federal law prohibits buying a weapon in another state, that you cannot legally own in your state of residence.
I do not know of a Federal law that says you cannot own a gun in another state, that has been banned in your state of residence. There is a distinction.
But again, this is what lawyers are for.