fixes #5453 Error in console when you try to add two folders with the sa...

...me name

Fixed the issue and pushed the code for review, please check it.