Yet easier - you can actually just remove this check, and remove the l.belongs(filename) with an empty list.

Totally ok - it will always fail, but is a valid resource query.