MAX_URI_LENGTH on setting toc=true

Quite an interesting error, if I set toc=true for the notebook below


I get the following error

jekyll_1     |        Jekyll Feed: Generating feed for posts
jekyll_1     | URI error : Memory allocation failed : reaching arbitrary MAX_URI_LENGTH limit
jekyll_1     | 
jekyll_1     | URI error : Memory allocation failed : escaping URI value

If I remove toc:true, then everything works fine

If you clear all the outputs of the notebook then also the error will go away, any idea why is this happening?

Thanks