Actually fix #2274. The previous commit failed to include the fix.