verified https://sourceforge.net/p/asn1c/bugs/45/ with autotests
add back const qualifier
fix https://sourceforge.net/p/asn1c/bugs/51/