Fix cross-join between Project.filter_by_search_with_component_and_group

Problem to solve

All cross-joins arising from decomposing gitlab_sec from gitlab_main should be resolved. See parent epic for context.

  1. Remove allowed cross-join for relevant relation using associated documentation for guidance on removing cross-joins or cross-transactions occurrences

In this case we have a cross-join between projects and sbom_occurrences which requires scoping to a given projects namespaces

Edited by Lucas Charles