Fixed #1105: two unrelated bugs with a parser. See #1106 for more info.

Closed #1106.