Fix ensure to unregister version guard.

If there's an exception in `VersionGuard.new`, we'll be trying to unregister `nil`.