Make vector-set! type correctly on complicated inputs.

Closes PR13532.