Fix handling of nested lookup filters. Fix filter equivalency check.