"Merge selected features" leads to data loss (Fix #6902)