Fixed loading of m2m and o2m relations when a relationship references itself.
Removed unused variable in DB class