[#1135] Fix endless loop which will get triggered when an exception is thrown during freeHandlerBuffersAfterRemoval