Fix infinite loop with missing symbol definition

The local function _resolve_symbol is renamed for improved tracebacks.