d518a45 Ticket 7662 - db2index not properly evalauating arguments

Authored and Committed by mreynolds 6 years ago
    Ticket 7662 - db2index not properly evalauating arguments
    
    Description:  Fix a regression where the argument count gets adjusted
                  before it is checked for errors.  The fix is to copy the
                  number before we shift the arguments, and use that copy
                  for the usage check.
    
    https://pagure.io/389-ds-base/issue/47662
    
    Reviewed by: firstyear(Thanks!)
    
    (cherry picked from commit 46011e24580fcee2f438506f91b9fc119306defc)