Revert "Fix filelisting infinite loops"

This reverts commit ef8043bf0bebebb26dfc9f4ca1c4569ed217edb0.