I’ve no good explanation at the moment.
The custom node does not use an API method to find the layers and their references because it does not exist in the API.
I therefore use an empirical method of parsing the wall references which does not always seem to work.
Use instead the Element Reference node to retrieve the core center :