Hopefully fix an illegal string operation tolerate by Windows re #8073

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