Reset the issues array before we populate it

This prevents the number of issues from multiplying each time we
reload the issues overlay.

Also moving the $link var since it's only used within run().

Change-Id: I3648735cf4f289bc4f076cab4621817fe906a046
Merge "Reset the issues array before we populate it"