Ensure PageIds are part of elements when created by JS page classes, otherwise the display cannot be saved.
When calculating the intersection of displays prioritize the last display added.  This means that element weights from the last display will get priority.