We used to unconditionally take the ''next'' revision containing the scope, thereby skipping the changeset 1 when it already contained the scope. This would later lead to a `TypeError: expecting datetime ...` exception.
Fixes #9504.
(Added a regression test)