If you are not sure what each of the begin functions do, open library file and see if there is any setting that will overwrite the one previously set. Basically, i dont see the problem if there are no while loops in the begin function (and it should not be) and if they dont use the same pinout.