Fix a resource leak introduced by the change-counter optimisation. Also add some test coverage. (CVS 3790)
FossilOrigin-Name: ba0538a4977aefd6645554f1989f0a98b540b9cd
D
danielk1977 committed
241687280b7b059849532a5e818cd37d7738bb2d
Parent: 3057aaa