Preserve whitespace inside strings when creating cache keys. Fixes #1066