bugfix for active when pkg is already active error (#22587)
bugfix for active when pkg is already active error (#22587)

* bugfix for active when pkg is already active error

Co-authored-by: Greg Becker <aca6278cc1ea26b4a31cb1ebe2b9a46eb9d3325e@llnl.gov>
LLNL/spack,LLNL/spack,LLNL/spack,LLNL/spack,LLNL/spack