Rebuild mac table to avoid duplicates.