Remove temporary `selections` variable

All changes to the `selections` property were cached
in a local `selections` variable to be copied over
after the each loop ends.

`markSelected` can be called inside the loop and
uses the `selections` property so changes to that
property need to be made in the same iteration
as it is called.

It's also important that non-false values in
`selections` are only set in `markSelected` so
the line in `getSelections` that did this is
removed.