when signatures were not added because of too many types already existing at a node, the diff was not being cleaned up; this led to a memory leak being reported at shutdown. (cherry picked from commit 2825bdb1ae5be801e7ed603ba2455ed9a308f1f7)