better error handling if counter keys are flushed while a counter is being composed