I was also in the same problem of fingerprint not working. Tried your method i.e. flashed persist zip and nougat rom (after wiping dalvik, system ,data, cache) and now when I try to clean flash custom Oreo rom . Gapps is not getting flashed . Its detecting the rom as 7.1.2. any solution for this