Fix some coding errors.

* alreadyVisited is now a reference, so use "." member access in place of "->".

* Reworked logic of the
    if (fn & fn->_this)
clause to obtain previous behavior and remove redundant else clause.