Html: fix handling of self closing nodes