Avoiding ambiguous column erros when saving, fixes #3803