Fix bug with shared relations (default scopes for example)