When recursively removing a directory content in a revision, ensure
to not remove state of file whose name has the same prefix as the
removed directory.
[Related sentry issue](https://sentry.softwareheritage.org/share/issue/96efa17c710b4168a295eb983c7d2901/)