Jekyll category filters twice

I am trying to do filter posts by category. The code at the bottom works, but some posts have two categories, and if these two categories are the same as another post, it shows twice. How do I show those with two categories once?

<h6>Cts</h6>
<ul class="group-links">
    {% assign reviews = site.articles %}
    {%- for file in reviews -%}
        {%- for categories in page.categories -%}
		  {% for category in categories %}
            {%- if file.title == page.title -%}
                {% break %}
            {%- else -%}
                {%- if file.categories contains category -%}
                    <li>
                        <a href="{{file.url}}">{{file.title}}</a>
                    </li>
                    {% break %}
                {%- endif -%}
            {%- endif -%}
		  {%- endfor -%}
        {%- endfor -%}
    {%- endfor -%}
</ul>