Quick fix for https://github.com/gitextensions/gitextensions/issues/2006 - refactoring needed.