Remove now-useless NOP marker.
Don't use a free variable if there's a local version.
Only allow unique argument names in co_varnames.

Others are treated as patterns (which are given unique names automatically) to prevent co_nlocals from containing wrong values.
The only other ways to fix this is to either allow MutableCode.co_varnames to contain multiple occurrences of the same name (and that will break everything else) or forbid having multiple arguments with the same name (patterns make this one difficult, and wrong.)