Couldn't you simply check `self.locked` here and not change the semantics of `_resize_c`?