Agreed, no problem at all.
Even no problem when doing this in a way an airline might object to (but has no legal ground for this anyway), which is:
1: A->B
2: B->A
2: A->B
1: B->A
People used to do this to circumvent Sat/Sun night stay restrictions. Also useful if the B->A->B fare is lower than the A->B->A fare, and you need to do 2 trips.