Tests: extend testRecoverFromPreviousVersion to sometimes index during relocation

Relates to #7729

Closes #7768