tm: Generate synonym_id based on original request

- Prevent allocating pkg memory in a shm-alloc'd copy
- Prevents a crash that can occur in requests with pre-3261 branch tags
(cherry picked from commit c5afbe15361bbf7e9493ad02dcabfd4c6d420109)