possible fix for #504

It's a bit hackish, but should prevent all those random build failures.

Let me know if you want me to find a more elegant way to compare decoded strings.  json encoding, then ordered decoding seems to work here...