Backport to 1.2: Fix outside-of-project check when project path is not canonical. See merge request !834