Fix bug where xhr test requests would recurse