BUG: long Unicode passwords are broken!

When trying to make a new volume with a long Unicode password (45+ characters), Veracrypt treats the password as invalid, or not matching.

Try this please:
1) Press the button to create a new encrypted file container.
2) On the "Volume Password" screen, try pasting this password in:

ô7hÝá“3#3bža%Ñ‘¼¬<Þ%$T,‰Žžnv´!ÇZ^ÒƒÈþgH1ûßîjX

3) Notice that the "Next" button is grayed out on the bottom. This password doesn't work!
4) Now paste this password instead. It should work fine:

Dsw[#hZ.r8ikIbV1Yh]sk2iX&1{LF0k.<T]CyD.nXIb3f

This only happens when there are Unicode characters in a long password (45+ characters). Shorter passwords, even with Unicode characters, usually work fine.
The error is not consistent however. I think there is a bug in the "password verification" code.

Actually hashing is already implemented in derive_key_XXX functions in
Pkcs5.c (below an extract of derive_key_sha512)
One idea that has been proposed already is to activate the hash at the top of the logic using the same hash as the PRF and do it only for passwords exceeding the 64 bytes limit in order to retain compatibility with existing containers. The implementation has
never made it to the official sources and more time is needed to study it.