Bone Constraints source\target problem

In Blender 2.5, when I script a constraint (other than IK) using :

bpy.ops.object.constraint_add_with_targets(type='COPY_LOCATION')

It places the constraint on the armature object level instead of on the bone. I think this is because there’s no equivalent to the target/subtarget field when you’re setting the source. Can anyone think of a work around for this issue?

When I do an IK constraint it actually creates an empty and sets that as the target but you can go in and manually set the constraint target to the armature and the subtarget to the correct bone.

Again, all of this is happening through scripting. It actually works if you click on the bones (and the console reports the same method that I called above but for some reason it works there)

Thanks for any help!