Fixed bug where detached relations were not kept unless previously attached