Fix for Exception if 2 properties have the same name

And an additional test to test it.