Fix resource ids change fiasco.

Fixes #5008