Avoid anoynmous function for is_replicator_db test

Before when we used a regexp to perform this check we used an anonymous
function so that we could cache the compiled regexp in its closure.
Since we stopped using a regexp this is no longer necessary.

BugzId: 24266