hadrian: Throw error on duplicate-named flavours

Throw an error if the user requests a flavour for which there is more
than one match.

Fixes #17156.
22 jobs for master in 1 minute and 13 seconds (queued for 1 second)
latest
Name Stage Failure
failed
lint-submods-branch Lint
Submodule update(s) detected in c3fde723633d1788e4ded8c6f59eb7cef1ae95fd:
utils/haddock => e2c0a757f5aae215d89e464a7e45f9777c27c8f0
OK
Submodule update(s) detected in d589410f6bf394c8aca53f18848bbe4dfca92f23:
libraries/haskeline => 463fc49d17bfab846cceba48bccc02ef285e6cba
OK
Submodule update(s) detected in d491a6795d507eabe35d8aec63c534d29f2d305b:
*FAIL* commit message does not contain magic 'submodule' word
ERROR: Job failed: exit code 1