Cleaner declaration of isSubfolder()

Fixes one call to isSubfolder that was passing an object and not a DOM
element