Added defs_by_name.
Made defs_by_name lookups not add spurious entries.