Fix for "exists" handling on typed hashes

Made in cooperation with jnthn++ and moritz++