Whoops, failed to take account @next in header join opt.
Merge pull request #196 from RackerWilliams/header_join_fix

Fixed potential bug where @next is not taken into account in the header join optimization