IMPALA-735. Fix codegen bug affecting outer joins.

Change-Id: I99ca45b558fb2ed694f261a22e7e91e59f1ad675
Reviewed-on: http://gerrit.ent.cloudera.com:8080/1407
Reviewed-by: Nong Li <nong@cloudera.com>
Tested-by: jenkins