Avoid adding id if it already exists with different case

Fixes #3