code_placement: fix only kept nodes getting moved into loops

Privously nodes that only had a keep-alive users would be moved up but
never down again.