Fix a cornercase related to empty pass objects.

Fixes #1612
Testcase by: 	daghf