Fixed an issue with the method for obtaining the Y position of a given layer in a particle stack.