fix null relationship regression

This broke again. I added a test.