A possible workaround is to directly navigate the relationship instead of defining a JOIN variable; for example:
SELECT AVG(o.totalPrice), o.customer FROM Order GROUP BY o.customer