Filter out blocks with duplicate IDs when checking for blocks