append_repo: preserve existing repo atom

This will fix bug #461948.