Added a special case optimization for creating a single element.