Fixed #863

 * Number of tests to run calculated incorrectly when --repeat is used