Fail in metadata parsing if the id path is not a value but rather an array or an object.

Closes #2275