Fixing issue with soft deletes in related columns (Closes #277)