Backported MAAS brige fixes for LXC/KVM containers from master

See more info in the original PR #1046.
No logic changes, just backported to 1.20.