Reorganise the stream selection to try and minimise the chance of recursion
depth errors