Stop lock errors for deleted projects

Stops errors being logged when a user deletes a project but leaves the
plan editing page open in another tab/browser.