### Godot version

Beta 17, master

### System information

Windows 11

### Issue description

Godot gets a hard crash while attempting to code-complete for member `const` of a class.

### Steps to reproduce

```GDScript
enum E { V1 }

const e := E
```

And then type a `.` after the last `E`, which triggers code hints/auto-completion for subscripts based on `E` and causes a hard crash.

Does not happen for `var e := E.V1`.

### Minimal reproduction project

See above.
ERR_FAIL_NULL(p_node);
	ERR_FAIL_NULL(p_list);
	if (p_list->find(p_node) != nullptr) {
		return;
	}
	p_list->push_back(p_node);
	
	
	if (p_node->base_type.class_type != nullptr) {
		get_class_node_current_scope_classes(p_node->base_type.class_type, p_list);
	}
	if (p_node->outer != nullptr) {
		get_class_node_current_scope_classes(p_node->outer, p_list);
	}
}
Error GDScriptAnalyzer::resolve_class_inheritance(GDScriptParser::ClassNode *p_class, const GDScriptParser::Node *p_source) {