Why is rightBarButtonItem crashing?
<p>Why do I get a crash <code>"Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[__NSArrayM objectAtIndex:]: index 2 beyond bounds [0 .. 1]"</code> after setting <code>rightBarButtonItem</code>?  </p>

<p>In my app, I have three buttons on the right hand side, one of which should alternate with the <code>systemEditButton</code>. So I set the buttons up with<code>rightBarButtonItems</code> (note the "s") and then change the right-hand one using rightBarButtonItem when appropriate.</p>

<p>With 5.0, Apple lets you set multiple items in the <code>leftBarButtonItems</code> and <code>rightBarButtonItems</code> of a <code>NavigationBar</code>.  It also says you can change the outer one with <code>leftBarButtonItem</code> and <code>rightBarButtonItem</code> respectively ("The first item in the array can also be set using the <code>rightBarButtonItem</code> property"). </p>

<p>Works fine the first time, but then it crashes when I put back the original button.  Even worse, it doesn't object when I set it, it crashes later during the animation of <code>UINavigationBar layoutSubViews</code>.  Checking <code>rightBarButtonItems</code> after setting <code>rightBarButtonItems</code> shows it correctly updated the array, but it crashes during layout.</p>
