imagevariant.bbclass: handle trivial variant/feature name collisions.
imagevariant.bbclass: handle trivial variant/feature name collisions.

Don't go into infinite recursion for trivial namespace collision of
variants and IMAGE_FEATUREs. This happens when a variant contains an
IMAGE_FEATURE with an identical name. For instance the following sample
would fail without this patch, recursing on expanding flatpak until
the maximum recursion depth is exceeded:

...
IMAGE_FEATURES[validitems] += " \
    flatpak \
    tools-sdk dev-pkgs tools-debug tools-profile \
"

FEATURE_PACKAGES_flatpak = " \
    packagegroup-flatpak \
    ${@'flatpak-predefined-repos' \
         if d.getVar('FLATPAK_APP_REPOS') else ''} \
"
...

IMAGE_VARIANT[flatpak] = "flatpak"

IMAGE_VARIANT[flatpak-sdk] = "flatpak tools-develop tools-debug dev-pkgs"

BBCLASSEXTEND = "imagevariant:flatpak imagevariant:flatpak-sdk"

Note that we only handle reasonable to be expected trivial immediate
recursion. Difficult to follow/understand complex cases involving two
or more variant/feature pairs ([foo] = "bar foobar", [bar] = "xyzzy",
[xyzzy] = "foo") we intentionally let fail, although we now give an
error message hinting at the probably cause of the failure.

Signed-off-by: Krisztian Litkey <6dde0c906887b4a42f7754d4b4ba32f77313cd97@intel.com>

intel/intel-iot-refkit,mythi/intel-iot-refkit,klihub/intel-iot-refkit,mythi/intel-iot-refkit,klihub/intel-iot-refkit,YinThong/intel-iot-refkit,jairglez/intel-iot-refkit,ipuustin/intel-iot-refkit,intel/intel-iot-refkit,intel/intel-iot-refkit,ipuustin/intel-iot-refkit,mythi/intel-iot-refkit,YinThong/intel-iot-refkit,mythi/intel-iot-refkit,intel/intel-iot-refkit,mythi/intel-iot-refkit,ipuustin/intel-iot-refkit,YinThong/intel-iot-refkit,intel/intel-iot-refkit,klihub/intel-iot-refkit,YinThong/intel-iot-refkit,intel/intel-iot-refkit,klihub/intel-iot-refkit,jairglez/intel-iot-refkit,mythi/intel-iot-refkit,jairglez/intel-iot-refkit,ipuustin/intel-iot-refkit,intel/intel-iot-refkit,klihub/intel-iot-refkit,YinThong/intel-iot-refkit,ipuustin/intel-iot-refkit,YinThong/intel-iot-refkit,klihub/intel-iot-refkit,klihub/intel-iot-refkit,YinThong/intel-iot-refkit,jairglez/intel-iot-refkit,ipuustin/intel-iot-refkit,jairglez/intel-iot-refkit,jairglez/intel-iot-refkit,ipuustin/intel-iot-refkit,mythi/intel-iot-refkit,jairglez/intel-iot-refkit