This fixes #7684.  It now loads the inputs, outputs and processes only when it needs them.