Builder sold a mortgaged flat

Hi, I have bought a flat in Aug 2015.That time building was under construction and no one has done any registration and builder said yet to get E-kahat of each falts(as it comes under BMRDA) and he has provided all proper documents along with land EC for verification. All was fine. Again in Nov people has tarted doing registration and we asked about us he said there was some Khata rectification in my flat E-Khata that will take 1-2 month.Finally in Jan 2016 I have taken possession without registration as builder keep on promissing as he is working to get it corrected soon.This thing happening with 6 more Flats. And finally in Oct -2016 he has done registration of one of those 5 falts after ding khata rectification and promissed that he will clear our also. But even after Jan-2017 he has not done anything even after requesting so many time like what issue in my khata we all remaining 5 falts ownres taken EC and came to know that builder has kept our 5 flats Mortaged on Jan-2015 itself with DHFL once we aksed builder about this he promissed he will clear all mortaged on may-2017.but its not happen.DHAFL has come 1st time in mid of may-2017 and surprissed to see us in flat. DHFL has given an informal intimation that these flat belongs to DHFL and take NOC before registration. Now we have sent a legal notice to builder under 405 and 420 sec of IPC.But seems DHFL is planning to take physical possession of these house. How to handle such situation ? Don't think builder has money to clear mortagage amount. DHFL also has not kept any notice/info on site and were sleeping for 1.5 years. EOD we will be suffer as said Mortgage is registered mortaged with DHFL. Interesting thing is we have taken home loan from HDFC/LIC also and even they have also not validated flat issue ever. Help us how to get our flat back ?