Fix bug in unit test re #8724

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