Track reference levels by $index

values might be duplicate!