I just ran into the need to flush the receive buffer during a reboot. There may be an easier way to do it.
# flush old messages prior to your main loop
received_msg = xbee.receive()
while received_msg:
received_msg = xbee.receive()
while True:
# Your main loop