Initialize lastPixel_ properly

Fix for #1841.