Make the recaching in Cache.retrieve a little more conservative
Make the recaching in Cache.retrieve a little more conservative

This prevents a crash when switching to a branch that has future
history.

LogicalDash/LiSE,LogicalDash/LiSE