Track reference levels by $index

values might be duplicate!
Merge branch 'develop'

* develop:
  Track reference levels by $index