Add test for mutual relation

I have encountered problem with endless relation loop in version 0.6.0 and even though it was already fixed, I noticed there are no tests for this situation.