Merge "fix NPE when dump wins the race against emit" into nyc-dev