Filter to avoid filling duplicated shapes