Remove incorrect bwc branch logic from master
Commit bf007e8d936d82ed2d28c70da1a7366cfa862342 was a forward port of logic needed in 5.x to get
the correct bwc branch. However, other changes on master meant that this forward port was not
needed and actually broke the bwc tests. This change removes the incorrect if statement.
Relates #25134