reorder identifier lookup/storing, check local scope first