Ensures to call lstat_ex() only on regular files.