Fix a bug in ErrorCollectorWalker.