tbstack: fix memory region order check