Check if qualified `global` is defined in a function