Fix incorrect indent in serializer while loop.

Closes #277.