Fix parse_dictionary SEGV, make parse_name reuse results of parse_dictionary
Make it not lose part of variable name after last curly brace and s: prefix

Previously in `{abc}def` `def` was lost, in `s:{abc}` `s:` was lost (but not in 
`s:abc{def}`)