Fix issue that caused #new elements inside an object definition to be inserted twice

Since we are adding the cloned rule to the parent rule, when returning to the
recursiveMatchRulesToDisplayObjects() method it will be matched again. Now the
question arises where to put these rules. Until now they were applied before
all the others, which is the same than we do now. This is probably not the
definitive behavior, though.
Fix crash when attr() didn't select any elements
Fix issue that sometimes caused selector chains using flags inside of functions to not work

The flag instance was getting cloned and the _purging ivar contained garbage,
which sometimes turned out to be processed correctly in the selection system
and other times not.
Switch up logic to avoid warnings about unknown event type on every mouse move