MPS-20393 - fixed detection of static context