cue/cmd/cue: fix regression for -H flag
Instance iterator accidentally would include instance twice
in some cases, which caused it to be unified into a new
anonoymous package for which hidden fields would not
be shown.
Also adds an optimization in Unify to return one of
the arguments if they are identical, instead of unifying.
The setting the variable instead of returning makes using
a debugger easier.
Change-Id: I311c0d2dcb50d277a47eaaae352e5fb467935eba
Reviewed-on: https://cue-review.googlesource.com/c/cue/+/9844
Reviewed-by: CUE cueckoo <cueckoo@gmail.com>
Reviewed-by: Paul Jolly <paul@myitcv.org.uk>