stage logic to restore passthroughs recursively; minor optimization