Topological changes in a two-dimensional foam cluster