Fixes a performance issue in HandlesStreamInput