Remove const_casts by making spec_begin()/spec_end() const