fixes #665 Moved compareKeys to get better inlining