If that $20k was profit above and beyond your initial investment, and you used that money to actually buy $20K worth of guns, than you are correct, your investment in those guns is $0.
However if you just made $20K, and claim all the guns you ever bought were free, no that's not how it works.
You forgot where the IRS wants 40% of your new found $20K
Does that mean the IRS gets there guns for free??