protect against feature.layer not being set