Fix const_idx with multiple const, more tests
REF: has_constant remove special code in linear_model, is moved to data