Unit test checks duplicate names re #6983

Signed-off-by: Karl Palmen <karl.palmen@stfc.ac.uk>