Checks that we handle sync scripts which move to a different document inside their onerror handlers.