CORE-5832: fixed the parsing of flag parameters