fix strong purity deduction for pointers/arrays and const/immutable

I don't have an idea for a test case.