Makes an id synonym by storing an id to a new variable and then loading it back from that variable. Fixes #3192.