Fix non-reentrantness in #parse_entity_models