Fix repetition of walktree on module.exports