Restored commit introducing errors due to freed folder object