Fixed a bug in get_unique_from_attr causing input given by attr_name
to return an invalid value.