Fix a compiler warning re #8073

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