Fix a bug where bounds() could return a value that references an internal value.