UCs may actually insist you take the credit (whether from APs or DE) and refuse to allow you to repeat the lower level course. That was certainly the case for my S (at another UC, not Cal): he had to take Calc 3 in his first term with a 4 in Calc BC. They want you in and out as soon as possible, not hanging around beyond 4 years.