SERVER-8046 Fixed missed appendElement call implementation.