Fixed issue where global method ids are not handled correctly.

Global method ids were not being preserved in the case where the method is referenced from a resource type.