Fix bug in _is_reachable()

Some code was not indented and so was not actually part of the method, I think.