Add atom context detection to procdef.