According to the rules, you have to check the following criterias in the group among teams you're tied with:

1. Higher number of points obtained in the group matches played among the teams in question
2. Higher goal difference from the group matches played among the teams in question
3. Higher number of goals scored in the group matches played among the teams in question
4. Higher number of goals scored away from home in the group matches played among the teams in question

As talisman said, you're tied to 6 points according to rule 1, but the goal average (rule 2) among the teams tied makes you 3rd. The goal difference you see in the group takes into account the whole group, but when you're tied with others, only the goal average among the tied teams counts.