function purity analysis: safe access + safe return
'unnested' and higher-order tests
more function purity test cases