[runtime] Fix logic when allocating code region if the first try at a fixed address fails.