Changed the SetInnerValues extensions to TrySetInnerValues and made it return the number of changed values