Only do this if `debug?`? Array allocation is probably not a big deal but this is a very hot path