Optimize xorToViewer: don't traverse twice. Kudos to @tilgovi