(bug 47125) Avoid redundant filtering in dispatcher.

This change abourts the filtering operation as soon as the desired
number of changes is reached.

Change-Id: Idc7def15a5bd113b2cf38f8140f26098848bc1a7
Note: This is only a PARTIAL solution for bug 47125!
Merge "(bug 47125) Avoid redundant filtering in dispatcher."