Fixed not handling children correctly in OR chain generator