TMDM-7633: fix invalid boolean condition