CCP instruction was not checking for ownership properly. This PR fixes the bug, and refactors the code a bit so that similar issues cannot occur again as easily.
Checklist
[x] Breaking changes are clearly marked as such in the PR description and changelog
[x] New behavior is reflected in tests
Before requesting review
[x] I have reviewed the code myself
[ ] I have created follow-up issues caused by this PR and linked them here
CCP instruction was not checking for ownership properly. This PR fixes the bug, and refactors the code a bit so that similar issues cannot occur again as easily.
Checklist
Before requesting review