This is not a bug. It's desired behavior and works very well. From the manual:

Quote:
If name and index are both given, index is used to find the bone and name is set to the name of the bone resp. of the parent bone.