fix infinite recursion in TaskContext#max_sizes