Currently both the minimum and the maximum scale are applied inclusive.
One of the two must be applied exclusive and the other one inclusive.
Note that the minimum scale is exclusive when following SLD conventions (the maximum scale denominator is exclusive) and the maximum scale is inclusive (the minimum scale denominator is inclusive) .
This makes it possible to have layers with adjacent scale ranges: at the exact scale one of the two becomes visible because of a minimum scale restriction, the other one becomes invisible because of a maximum scale restriction.
Code that must be corrected:
returns true if the current scale == layerInfo.getMinimumScale().getPixelPerUnit()
Although it must return false in that case.