Fix bug in v0.33.3rc1 which caused infinite loops and OOMs