Getting how the mirror works is different from recognizing the object in the mirror as the image of yourself.
The test has come trouble differentiating between the two.
E.g. the ant might perceive the mirrored marked ant as another ant which would reasonably well fool this test.