Replace unchecked((uint)-1) with uint.MaxValue

Unchecked will cause problems with MSIL type safety verifications. uint.MaxValue is equivalent.