Vanguard Group Inc.’s biggest sustainable exchange-traded fund bought shares of gunmaker Sturm, Ruger & Co. Inc. and held them for more than a month, mimicking an error in the benchmark it tracks.

Vanguard ESG U.S. Stock ETF says it tracks an index that doesn’t include weapons manufacturers, along with other companies that socially responsible investors prefer to avoid. Though the Sturm, Ruger buy was temporary and small — 219 shares worth about $9,000 — it raises questions about the rapid growth of socially responsible investing, in general, and index strategies, in particular.

In September, Vanguard launched its ESGV fund, pegged to FTSE Russell’s US All Cap Choice index, which excludes nonrenewable energy, weapons manufacturers, and so-called vice products. ESG stands for environmental, social, and governance, for the values that it upholds in corporations. With a cost of just $1.20 per $1,000 invested, the fund quickly attracted about $560 million, making it the eighth-largest ESG-focused ETF.

In June, when FTSE Russell rebalanced the index, it erroneously included 11 stocks in the benchmark, including Sturm, Ruger, Vanguard said. FTSE Russell said the stocks were “inadvertently included” and clients were told as soon as it fixed the mistake.

“Though the exposure to these holdings was very modest, we regret that the error occurred and apologize to shareholders,” Vanguard spokesman Freddy Martino said in a statement to Bloomberg. Vanguard’s fund sold the shares Aug. 5, and Vanguard is considering adding its own additional controls to prevent future errors.

Fund analysts say index providers make mistakes like this on occasion, but ESG investors are particularly sensitive to what their funds do and don’t hold. Ben Johnson, head of passive strategy research for fund-tracker Morningstar Inc., said he’d never seen an indexer veer so far from its mandate. “It is very much material, diametrically opposed to the objective of the index and the desires of investors in the fund,” he said.

Index funds typically have some leeway to diverge from their underlying benchmarks, wiggle room a manager might use to address such tactical issues as liquidity or availability. Investors, though, typically use passive funds in order to keep human discretion to a minimum.

People interested in socially responsible portfolios may need to be a little more hands-on, said Shaheen Contractor, an analyst at Bloomberg Intelligence, who first discovered the gun stocks in the Vanguard fund. “There is need to look under the hood for all ESG funds.”