If you think you have found a legal loophole or gray area then the correct course of action is to send a letter to the responsible federal agency (like the IRS) and request a formal opinion letter as to the legality of your scheme. Once you have it in writing then you're in the clear and won't be prosecuted.