Merging activities with regarding user ids works

Fixes issue #1776