Contents of where clause overridden in join, resolves Issue 138

jdata is referenced twice, and it is not entirely clear why