HPCC-10106 Persist should ignore other persists when determining rebuild

Fix preexisting memory leak in seldom-used branch, spotted in code review.

Signed-off-by: Richard Chapman <rchapman@hpccsystems.com>