Doubled length value and added check if both values are the same which i...

...s unlikely to happen for wrong or broken packages

Probably fixes #2705
This naming pattern also sucks. I'm more for camel case and a clean comment but actually I don't care on unittests tbh