The instability occurred when rebasing something that has already been submitted
onto something that hasn't, and then resubmitting the stack. Or as the test
shows, just resubmitting and including something earlier that wasn't previously
submitted.
There's a general case here where any children (not just the ones in the range
of commits posted for review) should be re-stabilized. But handling the
selected commits here will cause the local:commit node values that are tracked
on Phabricator to be properly kept in sync.
Nit: I feel like using "rebasing" is confusing as it does not involve user-level rebase.