[MODULES-158] Resource discovery part 3: Misc fixes and path filtering at a module level