pkg: reintroduce less aggressive flags deduplication
Stripping non-consecutives options was dropped in 9adfd9eb, in order to prevent the alteration of the command semantics.
To mitigate cases when the generated flags list is too long, the deduplication is reintroduced but limited only to a few cases (-L, -l, -I) for which semantics is not altered by a repetition of the same flag.
Address issue: #75