fixed bug where construction of soil layers might fail if adjacent layers are too close