[BUGFIX] Avoid overwriting of menu items with same page uid

Fixes #336