Whew, that is a great question. First, if you did the reinvestment within 30 days, I have no idea why you were required to pay taxes! Did you consult an accountant at that time? (If you did, please find a new one!!) Below is the actual rule to avoid taxes on non-direct IRA rollovers:
A direct rollover, also called a trustee-to-trustee rollover, electronically moves the money from one account to another without any action on your part. With an indirect rollover, you receive a check which you then have to deposit in an approved retirement plan within 60 calendar days of withdrawal.
I am going to suggest you contact a Certified Public Accountant who specializes in these issues. But I will also send your question along to Ed Slott, the recognized IRA authority at www.IRAHelp.com.