Match doctype and tags case-independently

VE sends us an upper-case doctype, which we did not match properly.

Change-Id: I0904fd9bdfc599d6a7577573c712a5e03bb4e86b