Understanding the tax implications of treasury stock transactions