Fix the number of "to python" child arguments when the array length argument is shared. Fixes #366
When the arg cache already exists, we still need to increment n_to_py_child_args if this is an output argument.
When the arg cache already exists, we still need to increment n_to_py_child_args if this is an output argument.