TMDM-7499: "Improve always false condition handling"

Fix regressions on type checking (xsi:type) and security cleaning.