Fixed dequeueBuffer hack for newer counting syntax

Change-Id: I1fe5f30a50674b069a73fda8a24a2585ed449abe