Update templating to handle undefined vector_layers key gracefully.