Fix traceback for non-string values in lxc config files

Resolves #19055.