Additional fix to saving contenttype relations. Related to #564.