Some courts are taking a colder view of a legal tactic in which a solvent company shunts liabilities—sometimes massive class-action claims—into a new unit that then seeks bankruptcy protection.