The Supreme Court on Tuesday appeared leery of either striking down or upholding a 2017 tax provision on foreign gains: worrying about dismantling huge parts of the tax code on the one hand or unleashing a tide of new taxes on unrealized wealth on the other.