LP#1775958: Rework pullup mechanism to flatten more nested queries