Fix last-modified checking bug with NIO resources