issue #20154: Fix contact methods to handle natural key as input.
issue #20154: Make sure we always set the id attribute to the right one.