Remove post_parent relationships when a parent is deleted

Fixes #335