I am familiar with this scandal (but not a finance expert or anything).
The problem with loopholes is that it's up to interpretation. Is it intentional? Is it legal? These are hard problems to determine.
America famously offered a tax benefit for 'manufacturing'. But what constitutes manufacturing? If I have a restaurant, am I manufacturing food? It's hard to say.
I don't think what Shah did was criminal. But I do think the governments should be able to demand that he return the money if a court rules that their interpretation of the law was wrong,