When decoding a layer with key duplicates, getValue throws "feature referenced out of range key". A layer SHOULD NOT contain key duplicates by the spec, but tiles generated by Postgis ST_AsMVT can contain them.
The pull request #53 fixes that issue. I'll add a pull request for another possible fix.