What about specifying which layer you are baking to? And delete by layer? And materials?
This is done with Python: