core: Fix contact ID parsing with new URI name

Regression from 3f3b857, which prevented adding new contacts.