Fixed a bug in the exclude-side logic.