RobPratt's answer skips over some details. My answer attempts to fill in most of these steps.
Let $\newcommand{\A}{\mathcal A}\A$ denote the set of four-element subsets of $[8]$. For each $A\in \A$, let $S_A$ be the set of rearrangements of $11223344$ (hereafter: words) such that the subsequence $1234$ appears at the spots of $A$. The goal is to compute $|\bigcup_{A\in \A} S_A|$. To do this, we use PIE, but it will be a bit more difficult than most PIE problems.
Let $\mathscr U$ be the set of ordered pairs $(\mathcal B,w)$, where $\newcommand{\B}{\mathcal B}\B$ is an arbitrary subset of $\mathcal A$, and where $w$ is a word which belongs to $\bigcap_{B\in \B}S_B$. I claim that
$$
\left|\bigcup_{A\in \A}S_A\right|=\sum_{(\mathcal B,w)\in \mathscr U}(-1)^{|\B|}\tag1
$$
You can check that this is equivalent to PIE; when $|\mathcal B|=k$, we are adding up the contributions of the $k$-fold intersections to the PIE sum, which comes with a sign of $(-1)^k$. However, this sum is much too unwieldy to work with. The genius of Rob's answer is that it only sums over a much smaller, manageable subset, while getting the same answer.
Given $A_1,A_2\in \mathcal A$, we say they are compatible if, for every $x\in \{1,2,3\}$, we have
$$
\text{rank}(A_1,x)< \text{rank}(A_2,x+1)
\qquad
\text{and}
\qquad
\text{rank}(A_2,x)< \text{rank}(A_1,x+1)
$$
Here, $\text{rank}(S,k)$ means the $k^\text{th}$ smallest element of $S$. So, $\text{rank}(S,1)=\text{min}(S)$, while $\text{rank}(S,|S|)=\max S$. For example, the following two sets are incompatible:
$$
A_1=\{1,2,6,7\},\qquad A_2=\{3,4,6,7\}
$$
Any word in $S_{A_1}\cap S_{A_2}$ looks like $(1,2,1,2,\_,3,4,\_)$. Here is an equivalent, intuitive description of compatibility. If $A_1$ and $A_2$ are compatible, and $w\in S_{A_1}\cap S_{A_2}$, then the numbers at the locations in $w$ defined by $A_1\cup A_2$ will be in weakly increasing order. In the above example, the numbers in $(1,2,1,2,\_,3,4,\_)$ are not in weakly increasing order, hence $A_1$ and $A_2$ are incompatible.
Furthermore, we say that $\B\subset \A$ is compatible if, for all $B_1,B_2\in \mathcal B$, we have $B_1$ and $B_2$ are compatible.
Lemma: $\newcommand\N{\mathcal N}$ Consider the sum $\sum_{(\mathcal N,w)} (-1)^{|\mathcal N|}$, where $(\N,w)$ ranges over all ordered pairs such that $\N\subseteq \A$ is an incompatible family, and where $w\in \bigcap_{N\in \N}S_N$. This sum is equal to zero.
Proof: We will define a sign-reversing involution on the set of ordered pairs $(\N,w)$. This proves the ordered pairs can be partitioned into pairs with opposite sign, implying the alternating summation over them is zero.
If a $\N$ is incompatible, then there exists subsets $N_1,N_2\in \N$, and there exists $x\in \{1,2,3\}$, such that when you let
$$\text{rank}(N_1,x)=i\quad \text{rank}(N_1,x+1)=j\quad \text{rank}(N_2,x)=k\quad \text{rank}(N_2,x+1)=\ell,$$
then you have $i<j<k<\ell$. We define $(N_1,N_2,x)$ to be the lexicographically earliest ordered triple such that this inequality is true. Then, define
$$
N_3:= N_1\setminus \{j\}\cup \{\ell\}=N_2\setminus \{k\}\cup \{i\}
$$
Recall our example before; for the incompatible pair $N_1=\{1,2,6,7\}$ and $N_2=\{3,4,6,7\}$ (so, necessarily $x=1$), we would have $N_3=\{1,4,6,7\}$. The idea is that, if $w\in S_{N_1}\cap S_{N_2}$, then $w$ is automatically an element of $S_{N_3}$ as well. Therefore, we can safely add or remove $N_3$ from the incompatible family $\N$, while preserving the property that $w\in \bigcap_{N\in \N}S_N$. That is, if we let $\oplus$ denote the symmetric difference operator on sets, then our sign reversing involution is
$$
(\N,w)\mapsto (\N\oplus \{N_3\},w)
$$$\tag*{$\square$}$
With this lemma under our belt, we see that we can ignore all incompatible families in the sum in $(1)$, without changing the sum. Therefore, the entire sum is equal to the sum which only ranges over compatible families.
Lemma: Consider the sum in $(1)$, except we only sum over ordered pairs $(\mathcal C,w)$ such that $\mathcal C$ is a compatible family and for which $w\in \bigcap_{C\in \mathcal C} S_C$. This sum is equal to
$$\sum_{k=0}^4 (-1)^k \binom 4k \binom 8{4+k}(4-k)!$$
Proof sketch: The idea is that, if $\mathcal C$ is a compatible family, and $w$ is in the intersection of the $S_C$'s, then if you look at the spots of $w$ in $\bigcup_{C\in \mathcal C}C$, then the numbers at these spots must be in weakly increasing order. Therefore, choosing a compatible family occupied by a word $w$ goes exactly as described in Rob's answer. You choose $k$ numbers to be duplicated, choose the locations of the numbers in $\binom{8}{k+4}$ ways, and then arbitrarily permute the remaining $(4-k)$ numbers.
if len(subseq) == 1: return sequence.find(subseq[0], start_index) >= 0
$\endgroup$