Fix regression where declared IDs were ignored