title: Fragment is not removed from BackStack
body: <p>I use BackStack to store fragments and it works fine. However when I want to remove a fragment from BackStack, nothing happens. 
  I checked some questions like <a href="https://stackoverflow.com/questions/9033019/removing-a-fragment-from-the-back-stack">this</a> and saw that they do remove an item from BackStack by using popBackStack, like me, but it does not work for me.</p>
  
  <p>This is my code:</p>
  
  <pre><code>    FragmentManager fragmentManager = getSupportFragmentManager();
      FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();
      int count = getSupportFragmentManager().getBackStackEntryCount();
  
      String currentTag = getSupportFragmentManager().getBackStackEntryAt(getSupportFragmentManager().getBackStackEntryCount() - 1).getName();
      Fragment currentInstance = getSupportFragmentManager().findFragmentByTag(currentTag);
      fragmentTransaction.remove(currentInstance);
      fragmentTransaction.commit();
      fragmentManager.popBackStack(getSupportFragmentManager().getBackStackEntryCount() - 1, FragmentManager.POP_BACK_STACK_INCLUSIVE);
      int count1 = getSupportFragmentManager().getBackStackEntryCount();
  </code></pre>
  
  <p>currentInstance shows the topmost fragment correctly. Interestingly count and count1 are equals and the topmost item in stack remains after using popBackStack command. So I cant remove the topmost fragment from stack.</p>
  
  <p>If use this code:</p>
  
  <pre><code>        String previousTag = getSupportFragmentManager().getBackStackEntryAt(getSupportFragmentManager().getBackStackEntryCount() - 1).getName();
          Fragment previousInstance = getSupportFragmentManager().findFragmentByTag(previousTag);
  
          fragmentTransaction.replace(R.id.container_body, previousInstance,previousTag);
          fragmentTransaction.commit();
  </code></pre>
  
  <p>I could replace fragment with previous one, but it's not correct way to do that, because I can't back for more than one fragment.</p>