Bug #1889: fix in fsck, thanks to Rolandas Naujikas
(cherry picked from commit c26b857d5423eb3eada83500dfc349ad899e1e80)