Clone anchors on reference to avoid weird transformations on generated objects

There was a weird bug, where if the referenced object was a resource, the resulting object had two resources with the same relativeUri.

This is also a feature the RAML console has asked in the past too.