Residue classes of Lagrangian subbundles and Maslov classes