iMDBID cleanup improved a bit (rev. 10)

Signed-off-by: nixnodes <code@eth.si>