Fix cask loading behavior. Refs #5769
Merge pull request #5790 from federicobond/fix-cask-loading

Fix cask loading behavior