Add missing imports to geonode/geoserver/helpers.py
Safely ensure indexes exist before lookups when building the attribute map.