Fix the `Database::list_fields()` method (see #7277)