fix segfault in caching layer when using guard-splitting.