integration test verifying behaviour for missing references (rebuilding indexes)