[9.16] Check the prunelink member of the correct node
Commit 4b6fc97a checks the prunelink member of the node that was just pruned, not its parent node that was intended to be examined. Fix by checking the prunelink member of the parent node, so that adding the latter to its relevant prunenodes list twice is properly guarded against.
Closes #4596 (closed)