Interplay between native topology and non-native interactions in the folding of tethered proteins