Fix compilation crash reported in gh-1518 for gpujoin.
Merge pull request #1520 from nouiz/gpujoin

Fix compilation crash reported in gh-1518 for gpujoin.