The previous logic incorrectly assumed the returned address was already a p2wkh address. Instead, a p2sh address was returned. So we now correctly craft both the sigScript and witness stack for a nested p2sh spend.
The previous logic incorrectly assumed the returned address was already a p2wkh address. Instead, a p2sh address was returned. So we now correctly craft both the sigScript and witness stack for a nested p2sh spend.