Fix includes on association with a scope

Fix includes on association with a scope containing joins along with conditions on the joined assoiciation.

Currently when you try to call includes on an association with a scope containing joins in it, joins will not be included in the query.

This is a fix for that issue.
`order` can be called with `nil`, and that means `order` will not be applied.