Update: The new version of the patch attached to this e-mail fixes the test term-undecodable-input.

Some decodable input is necessary when sending undecodable input for term to flush the buffer it uses to keep undecoded multibyte characters. It seems that term-undecodable-input was relying on the issue fixed by this bug.