Revert cachedLocation change that caused issues with transports.

This partially reverts commit 2f5ac1a360342e180f24ac2289cf34fcb0b21045.
Merge pull request #6687 from pchote/fix-shellmap

Revert "Some minor Cargo style fixes."