Add back a content type check (removed in
49169c4832ac46662e0ad11082350ddf11e7f450) as suggested by @ametaireau