Fix incorrect reflexive many-to-many query generation

Resolve #32.