Bug #1612: Fix NPE adding children to newly created elements

The problem was that when you add a child to a newly created empty task, it
become the task in a container, and then mark the container as selected to ease
the insertion of new children.

In order to mark the container as selected the element needs to be renderer
before we try to select it, otherwise we have been getting a NPE.

FEA: ItEr77S04BugFixing