Fix corner case bug in pass rendering.

This bug was responsible for objects not appearing in SCIRun5 since
SCIRun5 is using subpasses.