The attached example project reproduces the error.
Joining an element collection and then selecting the joined alias produces SQL that fetches the "id" column of the collection table although there is no such column. I would expect that it fetches all properties of the collection table.
Think this might have been a duplicate of