Add Sasha's patch for has_many on new records.