Fixed problem with nested messages if there were multiple ones.