Fixed issue #1: Wrong results with right outer join.