If passing a dict with only a subset of all reaction bounds the function fails.
If you change the first line from:
fbids = self.getFluxBoundIds()
to
fbids = bounds.keys()
you can change all bounds if they are included in the bounds dict or only a subset.