Use substring-no-properties if available.