Ah yes, I forgot about this loop. I consider it kind of a stop-gap measure, but I can't think of a better way other than to explicitly get() every required key, check if the value is None or invalid, and if not then add it to secrule. Any ideas?