Implement namespace binding lifting

review @xeno-by