The From table needs to be referenced when retrieving
the tail, not the To table of the ContainerRelation.

Also tidied up spacing for sp_update().