Fixed inline captions not loading when the current URL has an empty hash

Fixes #6322