Decrease the use of generate-id(): phase 2

Use ahf:generateId() instead.