Fix LHCb failures related to pyROOT not finidng templates

if empty namespaces are not created before.