Go encoder: fix borken PerlCompat mode

This solution doesn't allow the code to create ARRAYREF and HASHREF
tags. Will fix it later.