tree: do not try to insert -1 rows

Thanks to the KDE CI infrastructure for catching this -- it is a bug and Qt's
asserts guard against it.