Ensure hash types are inserted as objects, not arrays (fixes #453)