I've always thought it awful that you have to consider taxes when making management decisions. But I will tell you something that my Mom's cousing said at a Farm Bureau when I was 14. He went on to become the president of the state association of CPA's and just retired. He opened with the following quote to a group of tax hating farmers in 1974.
"I wish I could pay a million dollars a year in taxes, (long pause) Because with what I know I would have made a hell of a lot of money."
What he taught was don't be stupid and foolishly avoid taxes but know the statutes or invest in a competant accountant.