[api] avoid conflicting flags in projects

Do not copy a flag if it has been set with same specification level.
No matter if it is an enable or disable one.