                FOR PUBLICATION

  UNITED STATES COURT OF APPEALS
       FOR THE NINTH CIRCUIT


UNITED STATES OF AMERICA,              Nos. 18-30037
            Plaintiff-Appellee,             18-30038

              v.                          D.C. Nos.
                                     5:05-cr-00003-RRB
TOMMY HANSON,                        4:17-cr-00071-RRB
        Defendant-Appellant.
                                           OPINION

      Appeal from the United States District Court
               for the District of Alaska
      Ralph R. Beistline, District Judge, Presiding

         Argued and Submitted August 7, 2019
                 Anchorage, Alaska

                   Filed August 28, 2019

     Before: Richard C. Tallman, Sandra S. Ikuta,
         and N. Randy Smith, Circuit Judges.

               Opinion by Judge Tallman
2                 UNITED STATES V. HANSON

                          SUMMARY *


                          Criminal Law

    The panel affirmed the defendant’s 2017 conviction for
receipt of child pornography, vacated the sentences imposed
for that conviction and for a violation of supervised release,
and remanded for resentencing on both matters.

    The panel held that the district court did not abuse its
discretion under Fed. R. Evid. 414 and 404(b) by admitting
evidence related to the defendant’s 2007 child pornography
conviction in his 2017 trial on similar charges.

    The panel held that the district court violated the Ex Post
Facto Clause when it sentenced the defendant to five years’
imprisonment under 18 U.S.C. § 3583(k) (2006) upon
revoking his supervised release rather than sentencing him
under the statutes as they existed in 2005 when he committed
his first child pornography offense. Under those statutes, the
maximum term of reimprisonment the district court could
impose after revoking the defendant’s supervised release on
his Class C felony conviction was two years.

    Reviewing for plain error, the panel agreed with the
government that the error was clear and obvious under
governing law. The panel held that the record raises at least
a reasonable probability that the district court would have
imposed a lower total sentence if it had known that the
maximum possible sentence on revocation of supervised

    *
      This summary constitutes no part of the opinion of the court. It
has been prepared by court staff for the convenience of the reader.
                UNITED STATES V. HANSON                    3

release was two years rather than five, and that the error
affected the defendant’s substantial rights. The panel
concluded that the error seriously affected the fairness,
integrity, or public reputation of the judicial proceedings,
requiring a remedy.

    Explaining that the “sentencing package” approach to
this case is appropriate, the panel vacated the sentences for
both the supervised release violation and the 2017
conviction, and remanded for resentencing. The panel wrote
that the district court is free to fashion an appropriate
combined sentence on remand, provided it does not impose
a sentence greater than two years on the supervision matter.


                        COUNSEL

John P. Balazs (argued), Sacramento, California, for
Defendant-Appellant.

Robert A. Parker (argued), Attorney; Brian A. Benczkowski,
Assistant Attorney General; Kyle F. Reardon and Adam
Alexander, Assistant United States Attorneys; Andrea W.
Hattan, Appellate Chief; Bryan Schroder, United States
Attorney; Criminal Division, Appellate Section, United
States Department of Justice, Washington, D.C.; for
Plaintiff-Appellee.
4               UNITED STATES V. HANSON

                        OPINION

TALLMAN, Circuit Judge:

    Appellant Tommy Hanson had served a prison term and
was under supervised release overseen by a United States
Probation Officer when he was again found in possession of
child pornography. He was convicted by jury verdict and
appeared for sentencing on both the 2017 substantive offense
and for the violation of the terms of his supervised release
triggered by his repeated criminal conduct. In these
consolidated appeals he challenges the 15-year sentence
imposed for receipt of child pornography, in violation of
18 U.S.C. § 2252(a)(2), and the consecutive five-year prison
sentence imposed under 18 U.S.C. § 3583(k), upon
revocation of his supervised release. We conclude that the
district court violated the Constitution’s Ex Post Facto
Clause when it sentenced Hanson under section 3583(k), and
that this was plain error warranting vacatur of the sentence
and a remand for a complete resentencing. We affirm
Hanson’s 2017 conviction because the district court did not
abuse its discretion by admitting evidence related to
Hanson’s prior 2007 child pornography conviction under
Federal Rules of Evidence 414 and 404(b).

    Because Hanson was sentenced for his supervised
release violation and his 2017 conviction in the same
proceeding, both were based on the same underlying conduct
found by a jury beyond a reasonable doubt, and because it
appears the district court was attempting to fashion an
appropriate “sentencing package” to account for both
transgressions, we follow our “customary practice,” United
States v. Christensen, 828 F.3d 763, 821 (9th Cir. 2015), and
remand for resentencing on both the supervised release
violation and the 2017 conviction.
                    UNITED STATES V. HANSON                             5

                                    I

    In 2005, federal officers arrested Hanson upon his return
from a trip overseas after his housesitter discovered child
pornography on his computer. Hanson gave a statement to
them in which he admitted to obtaining images of nude
underage      girls   from      two    online   newsgroups,
alt.binarypictures.hussie and alt.binarynudism. Hanson had
used an application called NewsBin to automatically
download illicit images from the newsgroups. Hanson
entered a conditional guilty plea in 2007 to one count of
possession of child pornography, in violation of 18 U.S.C.
§ 2252(a)(4)(B). 1 He was sentenced to 96 months of
imprisonment, followed by 60 months of supervised release.

    Upon release from federal prison, Hanson began serving
his term of supervised release in June 2012. In October
2016, during a routine inspection of the cabin where Hanson
was living, his federal probation officer found Hanson with
a laptop, external hard drive, and smartphone in violation of
the terms of his supervised release. Hanson admitted the
laptop and hard drive were his, but denied that they
contained any inappropriate images or content. The
probation officer seized the devices and provided them to the
FBI for forensic analysis.         Eventually, investigators
discovered a very large collection of pornography and child
pornography on the laptop and hard drive. 2 Both devices


    1
       Hanson appealed the denial of his motion to suppress and motion
to withdraw his guilty plea for ineffective assistance of counsel, as well
as the length of his sentence. We affirmed. See United States v. Hanson,
357 F. App’x 93, 93–94 (9th Cir. 2009).
    2
      Federal investigators tagged 6,104 images of child pornography on
the hard drive and 138 images of child pornography on the laptop as a
6                   UNITED STATES V. HANSON

also contained copies of the NewsBin application and a
similar program called News Rover.

     On May 18, 2017, his probation officer filed a petition
recommending revocation of Hanson’s supervised release,
and a month later, a federal grand jury charged Hanson with
receipt and possession of child pornography. Both the
petition and the indictment stemmed from the material found
on Hanson’s seized electronic devices. After a three-day
trial, a jury convicted Hanson of receipt of child
pornography. Hanson agreed to combine the disposition of
his supervised release revocation proceeding with the
sentencing in his criminal case.

    In its presentence report for Hanson’s 2017 conviction
(the “criminal matter” or “criminal conviction”), the
probation office noted that the statutory minimum sentence
for Hanson’s second child pornography conviction was
15 years under 18 U.S.C. § 2252(b)(1). Probation calculated
an advisory sentencing range of 210 to 262 months for the
offense and recommended the statutory mandatory
minimum sentence of 15 years, i.e., 180 months. To redress
the breach of the terms of supervised release (the
“supervision matter”), the probation office informed the
court that 18 U.S.C. § 3583(k) required a minimum term of
imprisonment of five years, 3 and further recommended that
the sentence be imposed consecutively to the term imposed
for Hanson’s 2017 conviction. At the combined sentencing
proceeding,     the    district   court    accepted   these


representative sample of the larger collection of child sexual exploitation
images found on the devices.
     3
       It was incorrect to apply section 3583(k) to Hanson’s case, as will
be further discussed below.
                UNITED STATES V. HANSON                     7

recommendations. As a result, the court understood—
incorrectly, as it turned out—that it could not impose a total
of less than 20 years of imprisonment unless it chose to run
the two sentences concurrently rather than consecutively.

    During the proceeding, counsel for the government
requested a 20-year sentence for the 2017 conviction
consecutive to “whatever sentence the Court imposes on the
supervision matter,” and asked if the court wished the
government “to address the supervision matter as well.” The
court responded: “Yes. I would like to know what you think
the entire sentence should be.” Government counsel stated:
“My recommendation is 25 years composite, so the 20 years
on the trial case, consecutive to the five-year minimum term
under 3583(k) on the supervised release violation,” noting
that it was “appropriate to impose some time consecutive
between the supervised release violation and the sentence in
this case, because there are two different interests at play.”

    In imposing the sentence, the district court said the
following:

       Here it is significant that the conduct of
       conviction was the same as the earlier
       conduct, which shows a pattern of conduct
       that was undeterred by years of prison,
       significant time of sexual abuse rehabilitation
       opportunities, all of which you ignored, none
       of which you cooperated with, and then
       you’re back doing the same thing in a way
       that you’re trying to hide your conduct. You
       knew what you were doing was wrong and
       yet     you     continued      to    do      it.


       ...
8                UNITED STATES V. HANSON

       That’s what leads me to think that when
       Congress said that someone in your situation
       should serve at least 15 years, I think that’s
       reasonable, because we’re trying to protect
       the public.

       This is unique to me to have someone who
       commits the crime, is sentenced for it, gets
       out of jail and then commits the same crime
       again, and then we have to kind of figure out
       how the two crimes mesh when in a way
       you’re being sentenced for very, very similar
       conduct.

       I think, you know, that looking at the two
       cases, I think a 20-year sentence is sufficient,
       but not greater than necessary to satisfy the
       sentencing goals.

       The way I get there, because I have to follow
       the legal framework, is in the first case . . . I
       think that I’ll accept the recommendation and
       would sentence you to the 180 months there,
       and then add five years in the second case,
       which brings me to 20 years.

       I think my addition is correct. 180, that’s
       15 years, plus 60 is 20 years. I think that’s a
       fair sentence for someone, given your age,
       given the fact you’re already 54.

    In closing, the court articulated the necessary findings in
support of the supervised release violation and revocation
sentence. It concluded that Hanson “absolutely” possessed
child pornography in violation of his terms of supervised
                UNITED STATES V. HANSON                     9

release “based on the jury verdict.” Judgments imposing
consecutive sentences totaling 20 years were separately
entered in the supervision matter and in the criminal matter,
and Hanson timely appealed from both judgments.

                              II

     Before we reach the sentencing issues in this case, we
first address whether the district court erred in allowing the
jury to consider evidence of Hanson’s 2007 guilty-plea
conviction for possession of child pornography during his
2017 trial on similar charges. We conclude that there was
no error, because the district court did not abuse its
discretion in admitting limited evidence of the prior
conviction under Federal Rules of Evidence 414 and 404(b).
See United States v. Martinez-Rodriguez, 472 F.3d 1087,
1091 (9th Cir. 2007) (a district court’s evidentiary rulings
are reviewed for abuse of discretion).

    As we have previously explained, before 1994, when
Federal Rules of Evidence 413 through 415 were passed,
admission of a defendant’s prior crimes or acts was governed
by Rule 404(b). See United States v. LeMay, 260 F.3d 1018,
1024 (9th Cir. 2001). Under Rule 404(b)(1), “[e]vidence of
a crime, wrong, or other act is not admissible to prove a
person’s character in order to show that on a particular
occasion the person acted in accordance with the character.”
Such evidence may be admissible, however, to prove
“motive, opportunity, intent, preparation, plan, knowledge,
identity, absence of mistake, or lack of accident.” Fed. R.
Evid. 404(b)(2).

    Rule 414 dramatically changed this rule with respect to
child molestation cases, providing: “In a criminal case in
which a defendant is accused of child molestation, the court
may admit evidence that the defendant committed any other
10              UNITED STATES V. HANSON

child molestation. The evidence may be considered on any
matter to which it is relevant.” Fed. R. Evid. 414(a). “Child
molestation” is defined as including crimes under 18 U.S.C.
Chapter 110, see Fed. R. Evid. 414(d)(2)(B), which includes
the receipt and possession of child pornography under
18 U.S.C. § 2252(a). We have held that Rule 414 is
constitutional but have also held that courts considering the
admissibility of evidence under that rule must still apply
Rule 403’s balancing test to that evidence. See LeMay, 260
F.3d at 1026–27; see also Fed. R. Evid. 403 (a court “may
exclude relevant evidence if its probative value is
substantially outweighed by a danger of one or more of the
following: unfair prejudice, confusing the issues, misleading
the jury, undue delay, wasting time, or needlessly presenting
cumulative evidence”).

   In determining whether evidence of Hanson’s prior
conviction for possession of child pornography was
admissible under Rule 414, the district court was required to
consider:

       (1) the similarity of the prior acts to the acts
       charged, (2) the closeness in time of the prior
       acts to the acts charged, (3) the frequency of
       the prior acts, (4) the presence or lack of
       intervening circumstances, and (5) the
       necessity of the evidence beyond the
       testimonies already offered at trial.

LeMay, 260 F.3d at 1026–28 (internal quotations omitted).
It properly did so here. Specifically, the court observed that
Hanson’s 2007 conviction and the 2017 charges were similar
                   UNITED STATES V. HANSON                          11

and were relatively close in time. 4 See id. at 1028–29
(concluding that the crimes were “very similar” and that the
passage of eleven years did “not render the decision to admit
relevant evidence of similar prior acts an abuse of
discretion”). And, as the government argued to the trial
court in its notice of intent to offer evidence pursuant to Rule
414, the evidence was helpful to prove that Hanson
“knowingly received” and “knowingly possessed” child
pornography images—i.e., the mens rea of the charged
crimes. Under LeMay, this is sufficient. See id. at 1029
(“Prior acts evidence need not be absolutely necessary to the
prosecution’s case in order to be introduced; it must simply
be helpful or practically necessary.”).

    The district court also ruled that, even if Rule 414 did not
apply, evidence of Hanson’s prior conviction was also
admissible under Rule 404(b) because it “help[ed] illustrate
how the events herein unfolded” and was “relevant to
establish plan, motive, knowledge, intent, and/or absen[ce]
of accident or mistake.” The test for admitting such
evidence is whether: “1) it tends to prove a material fact;
2) the prior act is not too remote in time; 3) the evidence is
sufficient to support a finding that the defendant committed
the act; and 4) where knowledge and intent are at issue, the
act is similar to that charged.” United States v. Tsinnijinnie,
91 F.3d 1285, 1288–89 (9th Cir. 1996). Those factors are
met here. Indeed, Hanson’s main defense at trial—as the
government had predicted—was that he accidentally
installed a backup from an old computer and did not know it
included pornography. Evidence that Hanson previously
confessed to using NewsBin to download images of nude
underage girls from online newsgroups helps to refute this

     4
       We note that Hanson spent seven years of this intervening period
in prison, presumably unable to download child pornography.
12                 UNITED STATES V. HANSON

defense because it tends to prove that he acted intentionally
in this case, once again using NewsBin and a similar
application to download new images from similar
newsgroups.

    Nor was the prior conviction evidence actually
introduced at trial overly prejudicial under Rule 403. In
addition to a redacted copy of the judgment shown to the jury
in 2017, the government introduced one paragraph from the
2007 presentence report describing Hanson’s admission to
using NewsBin to download images from specific
newsgroups. A limiting instruction was immediately given
and was repeated before the jury retired to deliberate. 5 We
have previously upheld the introduction of this kind of
“sanitized record” when followed immediately by a limiting
instruction. See United States v. Sheldon, 755 F.3d 1047,
1050–51 (9th Cir. 2014). On this record, the district court
did not abuse its discretion in admitting evidence of
Hanson’s prior conviction under Rules 414 and 404(b).

                                  III

    We turn now to the thornier issues this case presents:
namely, whether the district court plainly erred when it
sentenced Hanson to five years’ imprisonment under section
3583(k) upon revoking his supervised release, in violation of
the Ex Post Facto Clause, and, if so, the proper remedy. We

     5
       Further testimony about the conviction was elicited by the
government only during its cross-examination of Hanson after he
decided to take the stand in his own defense. Hanson has not challenged
the district court’s allowance of that line of cross-examination. See
Consolidated Brief of Appellant at 28 (“The contested evidence here
consisted of the judgment from Hanson’s [2007] case and admissions
from the presentence report that he made regarding the offense
conduct.”).
                 UNITED STATES V. HANSON                    13

hold that the district court committed plain error and that
both of Hanson’s sentences must be vacated and the case
remanded for a full resentencing on both the supervision
matter and the criminal matter.

                              A

    Article I of the Constitution of the United States provides
that neither Congress nor any state shall pass any ex post
facto law. U.S. Const. art. I, § 9, cl. 3, art. I, § 10, cl. 1.

       An ex post facto law is not simply one that
       makes criminal an act that was lawful at the
       time it was committed, or a law that increases
       a sentence following the commission of the
       act for which punishment is imposed. The ex
       post facto provision applies to a wide range
       of changes affecting trial procedures and the
       mechanics of punishment.

United States v. Paskow, 11 F.3d 873, 876 (9th Cir. 1993).
We have held that the Ex Post Facto Clause is violated
“when a statutory amendment that increases a penalty to be
imposed upon the revocation of supervised release is applied
in a case in which the underlying offense was committed
before the amendment was adopted but the conduct that led
to revocation of supervised release occurred afterwards.” Id.
at 875; see also Johnson v. United States, 529 U.S. 694, 699–
701 (2000) (noting that retroactive application of a statute
that “raises the penalty” upon revocation of supervised
release “from whatever the law provided” when the
underlying offense was committed is at odds with the Ex
Post Facto Clause).

   Yet that is precisely what occurred here. Hanson
committed his first child pornography offense in 2005. At
14               UNITED STATES V. HANSON

that time, federal law provided that, upon revocation of a
defendant’s supervised release, the district court could
“require the defendant to serve in prison all or part” of his
term of supervised release “without credit for time
previously served on postrelease supervision.” 18 U.S.C.
§ 3583(e)(3) (2005). The maximum possible term of
reimprisonment, however, depended upon the classification
of the underlying “offense that resulted in the term of
supervised release,” id., which in Hanson’s case was a Class
C felony, see 18 U.S.C. § 3559(a)(3) (2005). When the
district court revoked Hanson’s supervised release in 2017,
it was required to apply the statutes as they existed in 2005—
as a result, the maximum term of reimprisonment it could
impose upon Hanson after revoking his supervised release
on his Class C felony conviction was two years. See
18 U.S.C. § 3583(e)(3) (2005).

    Instead, the district court applied Section 141(e)(2) of the
Adam Walsh Child Protection and Safety Act, Pub. L. No.
109-248, 120 Stat. 587, enacted in 2006. That provision,
codified at 18 U.S.C. § 3583(k), requires revocation of
supervised release and reimprisonment for “not less than
5 years” for sex offenders who commit an additional sex
offense (including a child pornography offense such as
Hanson’s) while on supervised release. We do not fault the
district court for its error; the probation office and counsel
for the government both recommended the court apply
section 3583(k), and Hanson himself did not object to its
application on ex post facto grounds. Nevertheless, the fact
remains that Hanson could not properly be sentenced to
anything greater than two years of reimprisonment upon
revocation of his supervised release for his original child
pornography conviction. See 18 U.S.C. § 3583(e)(3) (2005);
Paskow, 11 F.3d at 883.
                    UNITED STATES V. HANSON                            15

    Because Hanson did not object to his revocation sentence
on ex post facto grounds below, we review for plain error.
See United States v. Chea, 231 F.3d 531, 535 (9th Cir.
2000). 6 To warrant relief on plain error review, a defendant
must show (1) error, that (2) was “clear or obvious, rather
than subject to reasonable dispute,” (3) “affected [his]
substantial rights, which in the ordinary case means . . . it
affected the outcome of the district court proceedings,” and
(4) “seriously affect[ed] the fairness, integrity or public
reputation of judicial proceedings.” Puckett v. United States,
556 U.S. 129, 135 (2009) (quotation marks omitted). In the
case of sentencing errors, the third prong generally requires
the defendant to show “a reasonable probability that he
would have received a different sentence” absent the error.
United States v. Dallman, 533 F.3d 755, 762 (9th Cir. 2008).
The probability of a different result must be “sufficient to
undermine confidence in the outcome of the proceeding.”
United States v. Dominguez Benitez, 542 U.S. 74, 83 (2004)
(quotation marks omitted).

   The government concedes that Hanson’s five-year
revocation sentence under section 3583(k) violates the Ex
Post Facto Clause. 7 It also concedes that in light of Paskow,
11 F.3d at 875, the error was clear and obvious under
governing law, and that Hanson has therefore satisfied his

    6
      We decline Hanson’s invitation to apply the “pure question of law”
exception to plain error review in this case, because we conclude that
Hanson is entitled to relief under the more stringent plain-error standard.
    7
       In Johnson, the Supreme Court held it was unnecessary to decide
whether retroactive application of a statute violated the Ex Post Facto
Clause because the Court determined that Congress did not intend for the
statute to apply retroactively. 529 U.S. at 702–03. Because the parties
agree that the district court erred in applying section 3583(k), we need
not reach this issue.
16                 UNITED STATES V. HANSON

burden under the first two prongs of the plain error standard.
We agree.

    The government argues, however, that Hanson has not
demonstrated a reasonable probability that he would have
received a different sentence absent the error. According to
the government, the district court’s remarks at the combined
sentencing hearing show that the court concluded a 20-year
sentence was the appropriate term when looking at Hanson’s
characteristics and conduct as a whole, and that if the court
had been aware that Hanson’s maximum revocation
sentence was only two years, it simply would have imposed
18 years for his 2017 criminal conviction.

     While we acknowledge that the court’s remarks at the
sentencing hearing demonstrate that it was concerned with
fashioning an appropriate total sentence, it does not
necessarily follow that, had the court understood that it could
not impose more than two years on the supervision matter, it
still would have sentenced Hanson to a total of 20 years.
Notably, the court actually gave Hanson the lowest possible
term of imprisonment under what it considered the
applicable mandatory minimums. 8 Nor did the court make

     8
       The only way the court could have gone lower was by running the
sentences concurrently rather than consecutively.            But, as the
government noted during the hearing, concurrent sentences would not
have appropriately accounted for the two different interests the court
sought to achieve. See United States v. Miqbel, 444 F.3d 1173, 1181–82
(9th Cir. 2006) (revocation sentences sanction a violator for his “breach
of trust,” as distinct from the interest in “provid[ing] just punishment”
and “promot[ing] respect for the law” that a court must consider when
imposing a sentence upon conviction of a criminal offense). If the court
had chosen to run the sentences concurrently, the practical effect would
be that Hanson would have received no sanction for his breach of trust
in repeating his criminal behavior while under supervised release from
his first child pornography offense.
                 UNITED STATES V. HANSON                    17

clear that it would have imposed the same 20-year sentence
had it known that the maximum sentence for the supervised
release violation was two years. Cf. United States v. Munoz-
Camarena, 631 F.3d 1028, 1030 n.5 (9th Cir. 2011) (holding
that an error in calculating the correct Guidelines range is
harmless under various circumstances indicating that the
court would have imposed the same term regardless of the
error).

    The record here raises at least a reasonable probability,
which we find sufficient to undermine our confidence in the
outcome of the proceeding, that the court would have
imposed a lower total sentence if it had known that the
maximum possible sentence on revocation of supervised
release was two years rather than five. Cf. Molina-Martinez
v. United States, 136 S. Ct. 1338, 1345 (2016) (“When a
defendant is sentenced under an incorrect Guidelines
range—whether or not the defendant’s ultimate sentence
falls within the correct range—the error itself can, and most
often will, be sufficient to show a reasonable probability of
a different outcome absent the error.”). But see Munoz-
Camarena, 631 F.3d at 1030 n.5 (“[H]armless error may
result if the district court: (1) acknowledges that the correct
Guidelines range is in dispute and performs his sentencing
analysis twice, beginning with both the correct and incorrect
range; (2) chooses a within-Guidelines sentence that falls
within both the incorrect and the correct Guidelines range
and explains the chosen sentence adequately; (3) imposes a
statutory minimum or maximum and adequately explains
why no additional or lesser term of imprisonment is
necessary; or (4) performs the sentencing analysis with
respect to an incorrect Guidelines range that overlaps
substantially with a correct Guidelines range such that the
explanation for the sentence imposed is sufficient even as to
the correct range.”). On this record, we are satisfied that the
18              UNITED STATES V. HANSON

district court’s error in applying section 3583(k) when
calculating Hanson’s sentence affected his substantial rights
as contemplated under the third prong of plain error review.

    We are also satisfied that the fourth prong of plain error
review is met. In Rosales-Mireles v. United States, the
district court miscalculated the Guidelines range, and, as
here, there was a reasonable likelihood that the defendant
would have received a different sentence absent the error.
138 S. Ct. 1897, 1905 (2018). The Supreme Court held that
in those circumstances, the miscalculation “seriously
affect[s] the fairness, integrity, or public reputation of
judicial proceedings, and thus will warrant relief.” Id.
at 1903. “The risk of unnecessary deprivation of liberty
particularly undermines the fairness, integrity, or public
reputation of judicial proceedings in the context of a plain
Guidelines error,” the Court reasoned, “because of the role
the district court plays in calculating the range and the
relative ease of correcting the error.” Id. at 1908.

    The same can be said here, where the district court relied
not on an incorrect calculation of the Guidelines range, but
rather on the wrong statute entirely, and, as in Rosales-
Mireles, there is a reasonable likelihood the defendant would
have received a different sentence but for the error. When
the district court relies on the wrong statute to sentence
someone to three years longer than the maximum legal
revocation sentence in violation of the Ex Post Facto Clause
and there is a reasonable likelihood the defendant would
have received a different sentence but for the error, the
concerns the Court articulated in Rosales-Mireles are present
and require a remedy even on plain error review. See id.
(“[W]hat reasonable citizen wouldn’t bear a rightly
diminished view of the judicial process and its integrity if
courts refused to correct obvious errors of their own devise
                 UNITED STATES V. HANSON                     19

that threaten to require individuals to linger longer in federal
prison than the law demands?”).

                               B

    We are left with the question of what remedy is
appropriate in this case. Hanson asks that we remand only
for resentencing on the supervision matter. The government,
pointing to “sentencing package” cases involving multicount
convictions, asks us to remand for resentencing on both the
supervision matter and the 2017 criminal conviction. The
government’s approach is appropriate here, as it accords
with our “customary practice.” See Christensen, 828 F.3d
at 821.

    “Sentencing package” cases “typically involve
multicount indictments and a successful attack by a
defendant on some but not all of the counts of conviction.”
Greenlaw v. United States, 554 U.S. 237, 253 (2008). In
such cases, an appeals court “may vacate the entire sentence
on all counts so that, on remand, the trial court can
reconfigure the sentencing plan to ensure that it remains
adequate to satisfy the [18 U.S.C. § 3553(a)] sentencing
factors.” Id. On remand in some of these cases, “trial courts
have imposed a sentence on the remaining counts longer
than the sentence originally imposed on those particular
counts, but yielding an aggregate sentence no longer than the
aggregate sentence initially imposed.” Id.

    We have endorsed the “sentencing package” principle in
numerous cases where a conviction on one or more counts
was vacated but convictions on the remaining counts were
affirmed. See, e.g., United States v. Davis, 854 F.3d 601,
606 (9th Cir. 2017); Christensen, 828 F.3d at 821; United
States v. Avila-Anguiano, 609 F.3d 1046, 1049 (9th Cir.
2010); United States v. Ruiz-Alvarez, 211 F.3d 1181, 1184
20                 UNITED STATES V. HANSON

(9th Cir. 2000); United States v. Handa, 122 F.3d 690, 692
(9th Cir. 1997). However, the parties have cited no
published case from this circuit (nor have we uncovered
one) 9 addressing the specific circumstances present here:
namely, where the sentence on a judgment of revocation of
supervised release and the sentence on a count of criminal
conviction, both based on the same underlying conduct, were
calculated and imposed at the same sentencing proceeding
but the revocation sentence was subsequently determined to
be illegal.

    Hanson contends that the usual practice in “sentencing
package” cases should not be followed under these
circumstances and the district court cannot resentence him
on both his supervision matter and his criminal matter where
only the former sentence has been invalidated. According to
Hanson, he was sentenced in two separate cases during one
proceeding simply as a matter of administrative efficiency,
and the separate considerations governing the imposition of
sanctions for violating supervised release, see Miqbel,
444 F.3d at 1182, and punishment for criminal conduct mean
that the court could not have been trying to impose a single,
overall sentencing package.

    Hanson’s position ignores what the district court said it
was doing during the sentencing hearing. The court asked
the parties to recommend a total sentence, and stated: “I

     9
       Though not cited by either party, we are aware that at least one
other circuit appears to have applied the sentencing packaging doctrine
to a case where both a new sentence and a revocation sentence were
imposed at the conclusion of a single sentencing proceeding. See United
States v. Taylor, 628 F.3d 420, 422, 425 (7th Cir. 2010) (applying the
sentencing packaging doctrine and vacating both sentences imposed “for
bank robbery and for violating the terms of . . . supervised release
relating to an earlier bank robbery conviction”).
                 UNITED STATES V. HANSON                     21

think . . . that looking at the two cases, I think a 20-year
sentence is sufficient, but not greater than necessary to
satisfy the sentencing goals.” Thus, the record makes clear
the court was trying to fashion a fair overall sentence for both
the supervised release violation and the criminal conviction
(albeit based on the same underlying conduct)
notwithstanding the separate penological interests at play
here. We see no reason that the district court could not have
kept separate sentencing considerations in mind for the
revocation sentence and the criminal sentence, despite
fashioning an overall term of years in one sentencing
proceeding. We are confident that the district court is able
to walk and chew gum at the same time.

    We have long adopted a “packaging metaphor,” so that
when a sentencing package becomes “unbundled” due to a
judicial determination that a conviction or sentence was
invalid, the district court has the authority “to put together a
new package reflecting its considered judgment as to the
punishment the defendant deserve[d] for the crimes of which
he [wa]s still convicted.” Ruiz-Alvarez, 211 F.3d at 1184–
85 (quoting United States v. McClain, 133 F.3d 1191, 1193
(9th Cir. 1998)). Accordingly, when a defendant appeals a
sentence, and the appellate court remands the case for further
sentencing proceedings, we have “repeatedly held that this
court has the authority to vacate all of the sentences imposed
and to authorize the district court to begin the sentencing
process afresh.” Handa, 122 F.3d at 692. As we explained,
“[t]he metaphors of ‘package’ and ‘unbundling’ are
attractive and appear to reflect the realities of sentencing.”
Id. Although we have previously applied this packaging
metaphor in cases where a defendant was convicted of more
than one count of a multiple count indictment, “[n]o reason
appears why the same metaphor should not be used,” id., to
22                 UNITED STATES V. HANSON

permit the district court to resentence Hanson on both the
supervised release violation and the 2017 conviction.

     Indeed, the packaging metaphor is particularly
applicable here, given the district court’s approach of
looking to the bottom line, the total number of years that
Hanson would serve, in an attempt to “satisfy the sentencing
goals.” See id. The court’s decision to give Hanson 15 years
for the 2017 conviction was not made in a vacuum—it was
made, in part, based on the mistaken belief that Hanson
would serve five years on the supervision matter and thus
20 years total. We see no reason that the district court should
not have the opportunity, on remand, to “put together a new
package reflecting its considered judgment as to the
punishment” Hanson deserves for the crime of which he is
still convicted and the supervised release violation of which
he is also guilty. Id.

    Moreover, Hanson’s violative conduct—receipt of child
pornography—was found by a jury beyond a reasonable
doubt during the trial that resulted in his 2017 criminal
conviction rather than, as is more typical, by a judge based
on a preponderance of the evidence at a revocation hearing
after a defendant violates the terms and conditions of his
supervised release by engaging in behavior that may not
necessarily be illegal. 10 But here, the supervised release

     10
       Because a jury found that Hanson had committed the offense
beyond a reasonable doubt, we need not consider the impact of United
States v. Haymond, which held that the application of section 3583(k)
was unconstitutional where there was an “absence of a jury’s finding [of
proof] beyond a reasonable doubt.” 139 S. Ct. 2369, 2378 (2019). Nor
need we reach Hanson’s argument that section 3583(k) is
unconstitutional on its face. See Lyng v. Nw. Indian Cemetery Protective
Ass’n, 485 U.S. 439, 445 (1988) (“A fundamental and longstanding
principle of judicial restraint requires that courts avoid reaching
                   UNITED STATES V. HANSON                           23

violation and the 2017 criminal conviction are functionally
equivalent to separate “counts” in a multicount conviction.

    Accordingly, we vacate the sentences for both the
supervised release violation and the underlying offense and
remand for resentencing. 11 We note that “the decision to
restructure a defendant’s entire sentence when only one of
the counts of conviction is found to be invalid is
discretionary.” Troiano v. United States, 918 F.3d 1082,
1086–87 (9th Cir. 2019). On remand, the district court may
decide to simply reimpose Hanson’s 15-year sentence on his
2017 criminal conviction, or it may decide to increase that
sentence. 12 What it cannot do, however, as explained above
in Section III. A., is impose anything greater than two years
of reimprisonment on the supervision matter without
violating the Constitution. With this limitation in mind, the
district court is in the best position to determine the
appropriate total sentence to impose.




constitutional questions in advance of the necessity of deciding them.”).
We express no opinion as to that issue.
    11
         As we conclude that the “sentencing package” principle can
properly be applied here, we reject Hanson’s contention that the cross-
appeal rule prevents the district court from resentencing him on the
criminal matter because the government did not file a cross-appeal of
that sentence. Unbundling packaged sentences and remanding on all
counts “is not at odds with the cross-appeal rule, which stops appellate
judges from adding years to a defendant’s sentence on their own
initiative.” Greenlaw, 554 U.S. at 254.
    12
      It must resentence, however, “in accordance with the due process
considerations enunciated by the Supreme Court in North Carolina v.
Pearce,” United States v. Jenkins, 884 F.2d 433, 441 (9th Cir. 1989), and
Alabama v. Smith, 490 U.S. 794, 798–800 (1989).
24              UNITED STATES V. HANSON

                     CONCLUSION

    We affirm Hanson’s 2017 conviction because the district
court did not abuse its discretion by admitting evidence
related to Hanson’s prior child pornography conviction
under Federal Rules of Evidence 414 and 404(b). The
district court plainly erred, however, when it sentenced
Hanson to five years of reimprisonment under 18 U.S.C.
§ 3583(k) in violation of the Ex Post Facto Clause. We
vacate Hanson’s sentences on both the supervision matter
and the 2017 criminal conviction and remand for
resentencing. The district court is free to fashion an
appropriate combined sentence on remand, provided it does
not impose a sentence greater than two years on the
supervision matter.

    VACATED and REMANDED                  in   part   with
instructions; AFFIRMED in part.
