This seems pretty complicated relative to the original. It looks like, functionally, the change is that it now ignores `Lock`? How about simplifying down to this:

```diff
- if ((change.Change.ChangeType == TfsChangeType.Branch ||
-     change.Change.ChangeType == TfsChangeType.Merge) &&
+ var changeTypeIgnoringLock = change.ChangeType & ~TfsChangeType.Lock;
+ if ((changeTypeIgnoringLock == TfsChangeType.Branch ||
+     changeTypeIgnoringLock == TfsChangeType.Merge) &&
```