Fix typo in source check in mem3 reshard logic

Previously we matched both the shard record and the shard name to the same
variable. Fix the match and slighly improve readability by making a small
function for it.
1 file changed