Kernel density estimation and marginalization consistency