Re-use IDs where possible.

Refs #5565