fix NPE in join-query compilation when using salted tables