Try to optimize StatefulProvider exclusive access check