Account for readOnly mode when deciding if a new tab needs to be created
Fixes a bug where if readOnly mode is on you get down to one tab a second tab is opened when it really isn't needed.
Backport: release
Fixes a bug where if readOnly mode is on you get down to one tab a second tab is opened when it really isn't needed.
Backport: release