Do runtime logic instead of compile time DEBUG flag check to come around TeamCity weirdness.