Fixes to filter join and gcc 7.x compilation errors