Replace random DOM IDs with deterministic IDs