BS-10032: check that the container is not null, it can be the case if it
is contained in a Form Template