Fix python metadata scopes are not respected.