Fix error in subpath filter routine