Fix processing of ManyToManyField when it is empty

Signed-off-by: Fernando Rocha <fernandogrd@gmail.com>
Added regretion test for issue #632

Signed-off-by: Fernando Rocha <fernandogrd@gmail.com>
Merge pull request #632 from fernandogrd/master

Fix processing of ManyToManyField when it is empty