In the Obamacare ruling shakeout over the Obama Healthcare Mandate, it appears that Roberts changed his mind after writing the, then, majority opinion overturning the individual mandate based on the commerce clause. He later wrote the new majority opinion upholding the mandate under Congress’ taxing power.
The chief justice isn’t the only one having it both ways. Obama has loudly insisted an estimated one zillion times on national TV that the mandate is not a tax (and he still does, now that he’s won).
After Justice Kennedy’s famous question, “can we create commerce in order to regulate it?”, it looked like the court wasn’t going to uphold the mandate as regulated commerce. So, the administration lawyers argued, hell yes, it’s a tax!