maybe we should add a comment explaining why we cached the value, otherwise people might think it was a premature optimization and remove this logic (specially since we don't have tests for it).