Fix a cache bug.
Optimizer tweak.