Fixing overlay scaling by basing it on layer size, not final image size