Fix handling of multiple unnamed globals with the same type