Replace the deprecated function AddressScope#getScope.