Globally replace id placeholders for doubly nested associations