got the same situation - always error "invalid hid". problem was in plain mail style, if i switch to html version absolutely the same link working fine. reproduced on chrome54+roundcube. finally testcase looks like:
1) create account on any mailserver with roundcube web-frontend installed
2) login to mail account, set default style "plain text mail"
3) register on new installation MM
4) see that from plain view link not working
5) switch to ''html view' - email approved
some misterious think there because both URLs (plain/html) looks are the same