Fix SUBTOTAL implementation to use more than one ref