Fixed the problem with vector3 constructor
Whenever there's a port change that may change the inputs, the default inputs will be recalculated.
Moving the update port loop into its own function.
Replacement of #22542 since there has been no movement on the issue.
@akien-mga