I guess this check should be done the other way around? If `current->data.attribute_id` is -1 it can be bad to use it to index an array.