Eric, isn't it a problem to have two canonical tags in the same page source code?
I'm using a report tool juxseo.com and it's reporting two different canonical results based on if it's the home page or a category page. Home page resolves correctly but the category page results in saying that the canonical tag doesn't match this URL.
After I added the code above I reran the report and it didn't resolve the issue but it did add a second references in the code to the canonical tag (one to the specific category url).
Should I leave your code and shut off the canonical tag in AIOSEO so I only have one canonical tag showing?