Tests & fixes for --ports multi-port support