Fix bug in _customCommit dealing with contextSize and size pointing to the same reference value