[coretasks] Fix behavior for complex MODE lines where both + and - are used