One thing I wonder is if your oven temperature is accurate? An oven thermometer helps there. As well as a pizza stone to maintain a steady temperature. Also, how big was your chicken? Maybe you didn't cook long enough for the weight.
The method I use is this: Pre-heat the oven to 450. Clean bird, remove innards, truss. Salt (Tbls or so) and pepper or otherwise rub on marinade. Place the bird on a large cast iron skillet and cook for 1 hour. Remove bird and let rest for 10 minutes and meanwhile make a sauce utilizing the remnants in the pan. The skin is brown and the meat is juicy. This method is in Michael Ruhlman's, 'Ratio'. I find it to be a great method for basic roasted chicken.
I usually use a 4 - 5 lb chicken and haven't checked the internal temps since the first few times of using this recipe except for when I'm at or over the upper end.
I suspect you may have created a poor-man's slow-cooking environment in there. You had meat, and liquid, and a median temperature of around 200° F, and you probably also got the bird close to "done" during the first broil, before you even left the house. This is obviously easier to do when the meat is covered (was it in a covered roasting pan?) due to the steam, but the oven does provide some insulation to begin with.
Technically when slow-cooking you should theoretically be able to speed up the process by quickly bringing the meat up to just below doneness/moisture-loss temperature (130° F) and then switching to a moisture-preserving slow-cook method like braising. I think that's what you accidentally did, but it's hard to say for because nobody was there for an hour and it sounds like you didn't check the temperature before the second round in the oven.
My guess is that the second roast at 400° F was probably unnecessary, and that the bird was already done, having been cooked in a very slow roast.
I'm pretty sure it wasn't the basting that helped. It seems to be regarded as a myth these days that basting keeps the meat moist, because the baste really doesn't penetrate the skin (and it's not the skin you're worried about). Basting is done to add flavour, not preserve moisture.
The recipe itself also doesn't strike me as anything special in terms of keeping the bird moist, aside from having a relatively short cooking time (as with any grilling/broiling) and letting the meat rest afterward, neither of which really apply in your case. It was probably the slow heat that did it.
Best Answer
Assuming you thawed the chicken (to the extent that you did) in the refrigerator, and further assuming that it took less than an hour to reach a safe internal temperature, I would say you are fine. An internal temperature of 180ºF (80ºC) is safe by quite a margin.
The USDA recommends that home cooks do not keep food within the "Danger Zone" of 40-140ºF (4-60ºC) for more than 2 hours. This includes preparation and cooking time. If you thawed the bird on the kitchen counter, or if your chicken accompanied you on a long journey from the supermarket in an unfrozen state, you'll have to factor that time in.
As @Jefromi's comment on another answer notes, simply reaching a high enough internal temperature is not a guarantee of safety since some microbes produce toxins that are heat-stable.