More caching of bools in listitems

This replaces #3676 with commits that are a little more broken out.