Detect duplicate/forbidden names while parsing

Change-Id: I647590092dea7b1c374b1b2b0a7339d3845fd2bd