expand my hack to work with nodes that have flags but no chains and the