A note on local BRST cohomology of Yang-Mills type theories with free abelian factors