The driver code was almost there, but didn't work because ID nodes have no outlinks - and using links won't be safe anyway because of ordering issues. Instead, just loop over all IDNodes. Animation is fixed simply by referring to ARMATURE_EVAL instead of BONE in construct_node_identifier - the bArmature ID doesn't have BONE components in any case, so the old identifier can't work.