fix: preserve multi-value shape tensor inputs (#4477)