Fixed assertion error (again) caused by caching