Avoid some asserts on potentially iffy data

Authored by leinir on Feb 28 2020, 10:57 AM.