Named directory hash values are rendered into zsh code. Interpolating them inside double quotes is not enough for values containing quotes, glob syntax, or other shell metacharacters.
Render both the hash name and target with shell escaping so dirHashes entries are emitted as literal zsh arguments.