Actually, instead of doing this transformation on trees, wouldn't it be better to test the capability in the definition of outerJoin and emulate it there by calling the other join methods if needed?