Scenario: a task defined as def foo(mybool=True):, which thus generates the flags -m, --mybool and --no-mybool. All of them appear in --help, but completing inv foo - only shows -m and --mybool, not --no-mybool.
Diagnosis: this indicates a mismatch between the generation of flags for --complete output, and that for --help (and the parser overall).