Judge rules against environmental consultant over emissions