Update expansion algorithm in alternate algorithms to not output free-floating nodes.