95sec -> 25s runtime for scala 14

Don't recalculate values we've seen in the middle of longer chains