It looks like this won't work if a feature is in several layers. This case should be correctly handled I think.