Hm, I think you're right (though this is not a new issue).
checkCount(max) is only checking this local parts count and we want it to abort out if > keyLimit - count