This is the only bit that's different from the new code.
Can we share the above and guard this with if(!parent)
I was uncomfortable just always passing parent through in beginMoveRows without guarding that with a check, too, but OK ...
Reduce code duplication.
A bit queasy about just passing through parent though.
If you don't want to do it, don't do it.
Though I don't really understand what your concern is. If the parent is invalid, then it's invalid. The code will be the same.
+2 on either patch.