fix a bug that prevented a def expr to refer to itself