jsInHead sometimes removes the wrong duplicate

Description

The tag contains code to remove duplicate aliased libraries. Instead of removing the last one that was added, it removes the first.

Environment

None
Fixed

Assignee

Unassigned

Reporter

Blair McKenzie