Clean up layering violation in LSM code.