Fix bug: save-broadcast-data wiped out broadcast-indexes variable.

The inner function needs to return the state that was passed in.