Fix a potential assertion failure