Avoid reloading each cached cookbook on every resolve

#829 forward-ported onto master