Basis-shifting transactions involving partnerships and related parties