Fix for recursive type conversion, fixes #379