Fix CROSS JOIN bug

Fixes #1548