Correctly handle case of passing an actual RandomState.