> If I purchase for myself
If that is your earnest intent when you bought it, then ostensibly it would be legal. However...
Laws aren't computer code; gray areas get hashed out in court. How often you've done this and the amount of time that passed between the purchase and sale would be considered, as well as any paper trail you might have left. Simply put, there is no firm answer to your question. Talk to a real lawyer if you think you're wading into a gray area like that.