Refactored to use a simple helper function that wraps the logic of creating an SExprNode and returning the position in which it was inserted.

No functional change intended.