Infer a node's parent ID from the parent scope if one isn't explicitly given