Added LEFT OUTER JOIN and a patch

The for loop was missing a hasOwnProperty check