Fix bug #5990 - strict allocate should be checked before ftruncate