Fix test_layers tests. Tentative fix for #248

cc @dustinlacewell