Fix #1132 by passing segment IDs, not segment instances