clean up createChildView

This makes the code more clear and prevents
overwriting arguments which likely causes
de-opts (though these fns probably still
de-opt for other reasons).
Merge pull request #9949 from machty/create-child-view-cleanup

clean up createChildView