Posted by developer:
Fixed as of the upcoming 5.6.40, 5.7.22, 8.0.5 release, and here's the changelog entry:
An online DDL operation that rebuilds the table raised an assertion when the
last insert log record to be applied was split across two pages.