Description
If there are multiple sessions, but not all subjects have multiple sessions, then the conversion does not go correctly.
Requirements
The error is in BIDS.layout - there, it extracts the total number of sessions/session names from the last subject and not from all subjects. Therefore, if the last subject has only one session, it converts all others as if they would have had one session only.
Release notes
Correctly convert multi-session BIDS2Legacy even if not all subjects have multiple sessions.