I do not know if this is intentional, but i noticed that moonlight detectors will work at day if their covered with opaque blocks. a way to fix it is to have the sensor check for game time every several ticks(2-8), then output the corresponding redstone strength.
THis is the same as the covered daylight detector working at night: MC-5927