HSEARCH-1718 Avoid array resize overhead in the ErrorContextBuilder