XWIKI-8742: Adding a page through the menu fails when the current page d...

This pull request is related to http://jira.xwiki.org/browse/XWIKI-8742 for the Bug Fixing Day.