`_getActiveColorAttachments` should also be cached.  This is way too slow to do per command.  We've spent and will continue to spend a lot of time optimizing commands so we can't let things like this in.