Fixed a bug which caused layer depth to be ignored for strings