Improve C style casts detection

Cases where `const` was on the right of asterisk are valid but were not detected
This specific unit test is for deeper testing both "before" and "after" the change.