Fix noncecount update (bug #5308, redone fix)