initial support for keeping layers in correct order