'set' results in 'Corrupted statement'

See #780