Fix bug #1642

When checking the condition
`isOnlyChildAndParentAlreadyInUseByHoursOrExpenses` the parent might
be a new object. In that case the check if false and no further
querying must be done in the parent.