Prototype proof that static caching is type-correct

See comments for extra info.