Judge sides with funeral home owner in yearlong dispute over new license