Fix catalog frees when postgis is not available