(adjust_blocks): Code it as a function again.