Assuming that this is entirely legal, I don't see how this is a problem in Google's behaviour. If there is a problem, it is in the tax code, and the Government has sole responsibility for that.
Making tax codes simpler would make it easier to not leave loopholes, but politics always seems to drive it in the other direction. Perhaps the need to avoid this kind of situation can be a good force in keeping tax codes simpler.