Select related tested

Fixed the still failing query time propagation.

Conditional statements in JOINs were added with wrong aliases in the case data was prefetched. This is done when using the 'select_related' method on a Django QuerySet.
The result was a wrong set of results returned from the DB (since the SQL statement was wrong, obviously).