fix Issue 10254 - Purity correctness is broken with constructor