Change list_* functions to be safe
Revise unsafe calls of itlist and end_itlist functions