HIVE-8549: NPE in PK-FK inference when one side of join is complex tree (Prasanth J via Gunther Hagleitner)