rs485-extension: Fixes on state management.

Tested with two stacks in the bus.