Fix bug that produced duplicate ids on methods

in cases where methods are repeated due to being
in repeated resource_types.