Improve C style casts detection

Cases where `const` was on the right of asterisk are valid but were not detected
Is this unit test related to your fix?