Made the thread flags determination tests first check for the canonical