Kotlin builder: make sure that caches are lazily initialized (KT-6409)