"the chap from Google got up and bluntly said it was his duty to find as many legal ways of paying less tax - if the government want it to stop, they have to tidy up the legislation."
This is true. A company has a legal duty to it's shareholders to return as much value to them as possible. Normally*, this includes paying as little tax as is legally possible. They are not only not breaking the law, but doing their legal duty by finding as many loopholes as possible.
The only way to stop this is to close the loopholes.
* I say normally to take into account the Starbucks situation. If the company starts to loose sales because of their tax arrangements, they will do something about it. In that case, paying more tax is returning more value to their shareholders.