Modify all queries to try pixel.owner.id when empty

This may not be correct overall, but it at least lets the
previously failing test pass. Where a query was made against
`obj.details.owner.id = :user_id` we fall back to using
`obj.details.owner.id = some_other_obj.details.owner.id`.

Likely this code can be refactored into a single helper method.