Prevent leaking DiffSafeHandle on UnmatchedPathException