Recursive ID replacement for content works