uncomment DoInvert = ('1' == BitString[i]) ^ CRC[15]; and remove the line above and it works.
Your replacement for the commented line is wrong. Right would be:
if (BitString[i] == '1')
DoInvert = true ^ CRC[15];
else
DoInvert = false ^ CRC[15];