In rules, context.connection sometimes `undefined` during token refresh

During token refresh we’ve started seeing context.connection being undefined in our rules. This is only happening for username-password connections and it isn’t happening 100% of the time. We also have a couple of custom social connections that still seem to be working consistently. We’ve been using the connection from the context to select the corresponding identity in our linked accounts, so this is breaking our refresh flow. The only recent change we made to our configuration was renaming an application.

Should the context object of token refresh always know the connection type?