Yet another approach to duplicate filtering, this seems to work slightly better already

Signed-off-by: Toon Schoenmakers <nighteyes1993@gmail.com>