I managed to solve this after finding this article about references in appscript. I had to use a filter, like so: spread.page_items[its.label == 'foo']
.
Also, as suggested by Youngware below, the script labels support is indeed replaced by layer names.