Explanation: the current goal was set only externally, but it is used by
macro disambiguation.
To fix the bug I have finally changed the type of a "lazy_macro" so that its
input is now a context. it used to be an integer, the selected goal; however,
the integer does not make sense since a macro can be invoked also when there is
no current proof.