allow_render_dupli_instance used to pass zero-based index to give_current_material which is wrong. Before rev53332 it wasn't so much visible because give_current_material used to clamp index internally. But that was wrong behavior here anyway, and why nobody noticed this for so long? :)