Fix ASAN issue for determining if running in a KPart

Authored by hindenburg on Nov 22 2018, 3:58 PM.