Fix an issue where some threads may continue to fill the track container after its size has been reset to 0.
CC @cagapopo @acasaisv