BUG: The previous pickling fix caused a regression. This should fix it.