title: Fragment already added IllegalStateException with only one copy of fragment
body: <p>I know there have been several questions about this exception, however, I'm experiencing this exception with only one assignment while using the <code>FragmentStatePagerAdapter</code>.</p>
  
  <p>I indicated the line I'm experiencing the crash on below while setting up the adapter and pager.</p>
  
  <p><strong>Setting up my <code>Fragment</code>s:</strong>  </p>
  
  <pre><code>android.support.v4.app.FragmentTransaction t = getSupportFragmentManager().beginTransaction();
  t.add(0, new StarTabFragment(), "starTab");
  t.add(0, new HierarchiesTabFragment(), "hierarchyTab");
  t.add(0, new GroupsTabFragment(), "groupTab");
  t.add(0, new VehiclesTabFragment(), "hierarchyTab");
  t.commit();
  </code></pre>
  
  <p><strong>Setting up my adapter and pager:</strong></p>
  
  <pre><code>viewPager = (ViewPager) mDrawerLayoutRight.findViewById(R.id.pager);
  PagerTabStrip tabs = (PagerTabStrip) mDrawerLayoutRight.findViewById(R.id.pager_tab_strip);
  tabs.setTabIndicatorColor(Color.RED);
  
  CustomPagerAdapter customPagerAdapter = new CustomPagerAdapter(getSupportFragmentManager());
  viewPager.setOffscreenPageLimit(customPagerAdapter.getCount() - 2);
  viewPager.setAdapter(customPagerAdapter); //crashing here
  viewPager.setOnPageChangeListener(new LoopingPageChangeListener(viewPager));
  viewPager.setCurrentItem(1);
  </code></pre>
  
  <p><strong>Stacktrace:</strong></p>
  
  <pre><code>at android.app.LoadedApk$ReceiverDispatcher$Args.run(LoadedApk.java:876)
      at android.os.Handler.handleCallback(Handler.java:739)
      at android.os.Handler.dispatchMessage(Handler.java:95)
      at android.os.Looper.loop(Looper.java:135)
      at android.app.ActivityThread.main(ActivityThread.java:5343)
      at java.lang.reflect.Method.invoke(Native Method)
      at java.lang.reflect.Method.invoke(Method.java:372)
      at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:905)
      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:700)
  Caused by: java.lang.IllegalStateException: Fragment already added: StarTabFragment{d12eb55 #1 id=0x7f0b0116 starTab}
      at android.support.v4.app.FragmentManagerImpl.addFragment(FragmentManager.java:1197)
      at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:673)
      at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1489)
      at android.support.v4.app.FragmentManagerImpl.executePendingTransactions(FragmentManager.java:486)
      at android.support.v4.app.FragmentStatePagerAdapter.finishUpdate(FragmentStatePagerAdapter.java:163)
      at android.support.v4.view.ViewPager.populate(ViewPager.java:1073)
      at android.support.v4.view.ViewPager.populate(ViewPager.java:919)
      at android.support.v4.view.ViewPager.setAdapter(ViewPager.java:447)
      at com.company.activities.MapsActivity.setupSliderRight(MapsActivity.java:847)
      at com.company.activities.MapsActivity.access$2100(MapsActivity.java:112)
      at com.company.activities.MapsActivity$DBHierarchyResponseReceiver.onReceive(MapsActivity.java:2287)
      at android.app.LoadedApk$ReceiverDispatcher$Args.run(LoadedApk.java:866)
      at android.os.Handler.handleCallback(Handler.java:739)
      at android.os.Handler.dispatchMessage(Handler.java:95)
      at android.os.Looper.loop(Looper.java:135)
      at android.app.ActivityThread.main(ActivityThread.java:5343)
      at java.lang.reflect.Method.invoke(Native Method)
      at java.lang.reflect.Method.invoke(Method.java:372)
      at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:905)
      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:700)
  </code></pre>