// Removes the line if the stored purl doesn't match directive.
// This case may have happened when a vsite was deleted before
// directives were also deleted in vsite_access_node_delete().

Is the comment above not sufficient?
Maybe the variable should be called "$old_duplicate" instead?