(I think the use of bitmaps is the right one here, but this code doesn't actually work, pending PR 11566) original commit: 8bb2543b3403e98644aad2da032f8855055333f2
original commit: 4bfed6d7976d8ba10bc00a00aa7155b401b6ea4f
original commit: 28b404307793f041bb3363135a2968e283855318