Fix handling of alias in mongoose plugin