Break cycles when searching for activeTarget

Checking only the last target was not sufficient to detect longer
distance cycles.
Always include application in target chains

Whether we reached a dead end or a cycle consider the application
the next target.

This makes it impossible to prevent the application from being
considered a target whether on purpose or by mistake, for better or
worse. In practice this made it easier rather than having to dynamically
consider whether your nextTarget should be application if it would be 
a dead-end otherwise.