is this betweenness calculation correct?
It looks like a bug.
Here my guess. The bug seems coming from the _rescale function. Here, if the graph is indirected the computed values are multiplied by 0.5.
Since in the general betweenness_centrality
a node is considered twice (shortest paths are computed for each node in the graph) for the betweenness_centrality_sub
this is not necessary since shortest paths are only computed for the sources nodes.
Example:
nx.betweenness_centrality_subset(G,[2,6],[2,6])
# {1: 0.0, 5: 1.0, 2: 0.0, 3: 0.0, 4: 0.5, 6: 0.0, 7: 0.5}
So, if my guess is right, you just need to multiply by 2 the computed result.