[#1913] Fix getSegmentsFromRealPath for locked filesystem.