Fix a bug involving referencing a stack object.