Fixed bug related to strict HTML parser in 'html' package
moved Container nil check so it's tested less frequently