change how relations are detect so that it can work with relation proxies (aka octopus)
Merge pull request #176 from dontfidget/relation_proxy

change how relations are detect so that it can work with proxies