Minor performance fix in test