[Debugger] Improved logic for getting member expression debugger tooltips

Partial fix for bug #12498