Fix infinite recursion

The method for testing whether to include an association was causing
an infinite loop when two models referenced each other for json_api.