Make sure paths are compatible for comparison. Fix case #561347