slightly cleaner impl
resolve duplicates when appending completions