Do not change flag pads in agnosticbin tests

Change-Id: I26edca9440075d5d55b84ce1b3f2b72f44fd0493
agnosticbin: Check if queue is not NULL before doing other operations

This way it is easier to unref it correctly

Change-Id: I544900916defa91178343c1abf63e85503f9d316