Collapsing references when there is at least one

- patch set 2: updated Selenium tests

Change-Id: Ib9b2e33833ba3e420fed01fa4cfb65bf9fa75372
Merge "Collapsing references when there is at least one"