Bug fixes while working on !20906 (merged) that don't really have anything to do with that MR, so split off