Taught by the Flawed: How Dataset Insecurity Breeds Vulnerable AI Code