As discussed in bug #34931, the finish function should return a new ref. I'm opening a bug about it and not just doing it in the meta porter bug because it will need to be fixed in gabble too.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.