Is Loki still working for Thanos?

As we saw in the first Avengers, the relationship between Thanos and Loki was based on obedience and fear. And if we are to trust what the Other said, Loki will be punished for his failure. So this is an interesting question: Is Loki still, somehow, a part of the Mad Titan’s plans?
We daresay that he isn’t, and that Loki had plans of his own in the first place. Sure enough, Thanos gave him the means to conquer Earth – but that doesn’t mean the Trickster was going to hold up his end of the bargain. After all, he is the Trickster God. After all, he is not so foolish as to think that Thanos will spare him when he kills the MCU.
Furthermore, Loki has thus far been portrayed as an anti-hero, rather than just a straight-up villain. So we believe that, in the end, he will ally himself with the Avengers and the other heroes in order to defeat the Mad Titan.
This won’t end up too well for him, though, since we believe that he will die sacrificing himself for Thor. Again, but this time for real.
Or, at least, this is what we hope. We cannot even dare to believe that he is still working with Thanos, since this sort of plot would be based almost entirely on chance (as knowledgeable as the Mad Titan might be, he’d still have to rely on plenty of events over which he has no power at all).
