TABDEV-2463. Fixed crash that only occurred in enterprise builds.

Maybe a compiler bug? Definitely worth investigating more.