Fix segfault when no overlap in kerneldensity layers (#4857)