Faster broadcast_shape (+ tests)