Fix inconsistencies when autoloading when parsing headers

Danilo committer, Axel put in the fix!
Basically autolading was not disabled when looking up objects
during parsing. This lead to inconsistencies.
In other words, at library load headers are parsed. If one of these
headers triggers autoloading, other header parsing happens.
The presence of guards can make this operation ill defined if the
parsing of an header triggered by a lib interrupted to parse the
same header from whithin an autoloaded lib.
The presence of guards will prevent this second parsing.
A protection was added to disable object lookup when loading, which
also act as performance optimisation in a sense.