Query filtering does not work as expected with multiple foreign keys to the same table. 
This is a limitation of the `filter()` API. To get the correct semantics (and avoid extra queries when looking up associated usernames), you would need to write:

``` python
UA = User.alias()
q = (Tweet
     .select(Tweet, User, UA)
     .join(User, on=(Tweet.user1 == User.id))
     .switch(Tweet)
     .join(UA, on=(Tweet.user2 == UA.id).alias('user2'))
     .where(
         (User.username == 'foo') &
         (UA.username == 'bar')))
tweet = q.get()
print tweet.user1.username
print tweet.user2.username
```

Unfortunately, `filter()` does not do well with multiple joins to the same table.
 Hi again, and sorry to keep bothering with this. I investigated a little further and it seemed possible to make this work using aliases. I put together a pull request for this and was hoping you could take a look. I also hope that you think that the approach is reasonable.

Thanks as always for this amazing package.

Here is a small example to recreate this issue. I'm really hoping that you don't decide to deprecate the the filter API as I frequently use the REST API's from the retired flask-peewee module that relies on it.

I think the issue is that ensure_join does not care about the on clause of the join which causes the second join to be skipped.

``` python
from peewee import *

database = SqliteDatabase(':memory:')

class Model(Model):
    class Meta:
        database = database


class User(Model):
    username = CharField(unique=True)

class Tweet(Model):
    user1 = ForeignKeyField(User, related_name='tweets1')
    user2 = ForeignKeyField(User, related_name='tweets2')
    message = CharField()


User.create_table()
Tweet.create_table()

u1 = User.create(username="foo")
u2 = User.create(username="bar")

t1 = Tweet.create(user1=u1, user2=u2, message="boo")

# Following line prints "foo" as expected
print Tweet.filter(user1__username="foo", message="boo").get().user1.username


# Following line should print "foo" as well,
# but instead it raises an DoesNotExist exception.
print Tweet.filter(user1__username="foo", user2__username="bar").get().user1.username
```
