Restore no_join optimization